#!/usr/bin/python """Play Go!""" from imago.engine.parseHelpers import parseVertex from imago.gameLogic.gameState import GameState if __name__ == "__main__": GAMESTATE = GameState(5) #GAMESTATE = GameState(19) while True: GAMESTATE.getBoard().printBoard() move = input("Move (" + GAMESTATE.getPlayerCode() + "): ") try: move = parseVertex(move, GAMESTATE.size) except Exception as err: print("Invalid move syntax. Example of move: A1") continue print() player = str(GAMESTATE.getPlayerCode()) moveRow = move[0] moveCol = move[1] GAMESTATE.playMove(moveRow, moveCol)