Skip to content

Instantly share code, notes, and snippets.

@hasasn
Created July 2, 2015 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasasn/eee1a8cf04b5c0da7312 to your computer and use it in GitHub Desktop.
Save hasasn/eee1a8cf04b5c0da7312 to your computer and use it in GitHub Desktop.
scoping_xena_help
from Praetorian import base
print('ROTA api challenge.')
api = base.gameController()
def moveFirst(board):
if 'c' not in board:
update = api.status().get('data')
print(str(update))
api.place(5)
print('Player makes first move')
print(str(update))
return True
else:
return False
print(api.newGame())
firstMove = api.status().get('data')
board = list(firstMove['board'])
print(moveFirst(board))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment