-
-
Save joooyzee/ba0d21dc7090ebefab6a0d4e45d5effe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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