X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fsrc%2Fmain.py;h=44aa36075a8444ace5777991b5d1141923d020ac;hp=6ebf70c0972984a4a7db73cb3196a237084b940a;hb=538a32cb30f21a1a48653d7b639ab0c82db44d83;hpb=318bb473add1bf88ccc1c7edacb0feba0249e401 diff --git a/qchess/src/main.py b/qchess/src/main.py index 6ebf70c..44aa360 100644 --- a/qchess/src/main.py +++ b/qchess/src/main.py @@ -88,6 +88,7 @@ def main(argv): global sleep_timeout + retry_illegal = False server_addr = None max_moves = None @@ -185,7 +186,8 @@ def main(argv): sleep_timeout = -1 else: sleep_timeout = float(arg[2:].split("=")[1]) - + elif (arg[1] == '-' and arg[2:] == "retry-illegal"): + retry_illegal = not retry_illegal elif (arg[1] == '-' and arg[2:] == "help"): # Help os.system("less data/help.txt") # The best help function @@ -232,6 +234,7 @@ def main(argv): board = Board(style) board.max_moves = max_moves game = GameThread(board, players) + game.retry_illegal = retry_illegal