diff options
Diffstat (limited to 'go.py')
-rwxr-xr-x | go.py | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -22,10 +22,9 @@ def runGame(): move = parseVertex(move, GAMESTATE.size) except Exception as err: print("Invalid move syntax. Example of move: A1") + print() continue - print() - if move == "pass": GAMESTATE.playPass() @@ -34,10 +33,14 @@ def runGame(): gameEnded = True else: - moveRow = move[0] moveCol = move[1] - GAMESTATE.playMove(moveRow, moveCol) + try: + GAMESTATE.playMove(moveRow, moveCol) + except Exception as err: + print(err) + + print() if __name__ == "__main__": @@ -46,4 +49,5 @@ if __name__ == "__main__": except KeyboardInterrupt as err: print() print("Quitting: End of the game.") + print() sys.exit(0) |