aboutsummaryrefslogtreecommitdiff
path: root/go.py
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2023-06-09 13:12:05 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2023-06-09 13:12:05 +0200
commita005228a986b17732ae7cccbedde450533cfe1f1 (patch)
tree20dd63b13dd65c1d9fb5082f3a15ce5e5424317f /go.py
parent12431ce4c4ed52fcfc2180bcffdfec33e72b73ba (diff)
downloadimago-a005228a986b17732ae7cccbedde450533cfe1f1.tar.gz
imago-a005228a986b17732ae7cccbedde450533cfe1f1.zip
First usability test.
Diffstat (limited to 'go.py')
-rwxr-xr-xgo.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/go.py b/go.py
index c6553df..7580c2b 100755
--- a/go.py
+++ b/go.py
@@ -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)