git.ucc.asn.au
/
progcomp2013.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
QWebchess work
[progcomp2013.git]
/
qchess
/
src
/
main.py
diff --git
a/qchess/src/main.py
b/qchess/src/main.py
index
6ebf70c
..
44aa360
100644
(file)
--- a/
qchess/src/main.py
+++ b/
qchess/src/main.py
@@
-88,6
+88,7
@@
def main(argv):
global sleep_timeout
global sleep_timeout
+ retry_illegal = False
server_addr = None
max_moves = None
server_addr = None
max_moves = None
@@
-185,7
+186,8
@@
def main(argv):
sleep_timeout = -1
else:
sleep_timeout = float(arg[2:].split("=")[1])
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
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)
board = Board(style)
board.max_moves = max_moves
game = GameThread(board, players)
+ game.retry_illegal = retry_illegal
UCC
git Repository :: git.ucc.asn.au