Skip to content

Instantly share code, notes, and snippets.

@joooyzee
Created Jul 19, 2021
Embed
What would you like to do?
# given a list of tiles, return only those that are empty/free
def get_empty_tiles(self, tiles):
empty_tiles = []
for tile in tiles:
if not self.game_state.is_occupied(tile):
# add empty tiles to list
empty_tiles.append(tile)
return empty_tiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment