So I am creating a text-based Murder Mystery Game for Learn Python the Hard Way... So this is probably really simple but I can't figure it out.
Essentially I am choosing the location of clues, there are 16 options, 4 large locations, and 4 sublocations within each large location. However I don't want any clue to be located at the same location as another clue.
Currently I have it creating a dictionary for each item and subsequent location but it will choose the same locations sometimes. Would love some help thanks!
def determine_items():
items_needed = {}
items = ["weapon", "Clue #1", "Clue #2", "Evidence"]
print(items_needed)
for i in items:
hidden_sub = [0.1,0.2,0.3,0.4]
hidden_super = [1,2,3,4]
selected_super = random.choice(hidden_super)
Selected_sub = random.choice(hidden_sub)
exact = selected_super + Selected_sub
if exact == items_needed.values():
items_needed.clear()
determine_items()
else:
print("No Duplicates?")
items_needed[i] = exact