X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fsrc%2Fplayer.py;h=fffa73855df09f31f61bfd967764214e47541c78;hp=346674b227bc9296ade7bba59a19945733ceb555;hb=538a32cb30f21a1a48653d7b639ab0c82db44d83;hpb=318bb473add1bf88ccc1c7edacb0feba0249e401 diff --git a/qchess/src/player.py b/qchess/src/player.py index 346674b..fffa738 100644 --- a/qchess/src/player.py +++ b/qchess/src/player.py @@ -265,9 +265,11 @@ class HumanPlayer(Player): sys.stdout.write("SELECTION?\n") try: p = map(int, sys.stdin.readline().strip("\r\n ").split(" ")) + return p except: sys.stderr.write("ILLEGAL GIBBERISH\n") continue + # It's your move captain def get_move(self): if isinstance(graphics, GraphicsThread): @@ -283,6 +285,7 @@ class HumanPlayer(Player): sys.stdout.write("MOVE?\n") try: p = map(int, sys.stdin.readline().strip("\r\n ").split(" ")) + return p except: sys.stderr.write("ILLEGAL GIBBERISH\n") continue