Created
July 2, 2015 17:19
-
-
Save hasasn/eee1a8cf04b5c0da7312 to your computer and use it in GitHub Desktop.
scoping_xena_help
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
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