aboutsummaryrefslogtreecommitdiff
path: root/go.py
diff options
context:
space:
mode:
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)