Nov-14-2019, 04:50 AM
Having a problem with data types. The process below gives me a list of tuples, but I need to input the x and y as separate arguments. "Split" doesn't work on tuples, apparently. Maybe how I add them to the list can change? I can use 2 separate lists (one for x and one for y) but then I don't know how to make sure to use x's and y's that are actual pairs.
floor_locations = [] ### then I move my digger sprite with a random walk and add each step to list here: floor_locations.append(digger.rect.x, digger.rect.y) ### Then... key_location = random.choice(floor_locations) key1 = Key(key_location)