diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2023-06-09 13:12:05 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2023-06-09 13:12:05 +0200 |
commit | a005228a986b17732ae7cccbedde450533cfe1f1 (patch) | |
tree | 20dd63b13dd65c1d9fb5082f3a15ce5e5424317f /go.py | |
parent | 12431ce4c4ed52fcfc2180bcffdfec33e72b73ba (diff) | |
download | imago-a005228a986b17732ae7cccbedde450533cfe1f1.tar.gz imago-a005228a986b17732ae7cccbedde450533cfe1f1.zip |
First usability test.
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) |