Skip to content

Instantly share code, notes, and snippets.

@dnase
Created July 17, 2014 14:53
Show Gist options
  • Select an option

  • Save dnase/3bfcbaf6e1ec606f6530 to your computer and use it in GitHub Desktop.

Select an option

Save dnase/3bfcbaf6e1ec606f6530 to your computer and use it in GitHub Desktop.
def _available_moves(game_state):
#return a list of available moves on the board.
return [i for i, j in enumerate(game_state) if j != 'X' and j != 'O']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment