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
Actually commit stuff from ages ago
[progcomp2013.git]
/
qchess
/
src
/
main.py
diff --git
a/qchess/src/main.py
b/qchess/src/main.py
index
cbc07f7
..
748a459
100644
(file)
--- a/
qchess/src/main.py
+++ b/
qchess/src/main.py
@@
-109,7
+109,9
@@
def main(argv):
elif arg[1] == '-' and arg[2:] == "reveal":
always_reveal_states = True
elif (arg[1] == '-' and arg[2:] == "graphics"):
elif arg[1] == '-' and arg[2:] == "reveal":
always_reveal_states = True
elif (arg[1] == '-' and arg[2:] == "graphics"):
- graphics_enabled = not graphics_enabled
+ graphics_enabled = True
+ elif (arg[1] == '-' and arg[2:] == "no-graphics"):
+ graphics_enabled = False
elif (arg[1] == '-' and arg[2:].split("=")[0] == "file"):
# Load game from file
if len(arg[2:].split("=")) == 1:
elif (arg[1] == '-' and arg[2:].split("=")[0] == "file"):
# Load game from file
if len(arg[2:].split("=")) == 1:
@@
-119,7
+121,7
@@
def main(argv):
if f[0:7] == "http://":
src_file = HttpReplay(f)
else:
if f[0:7] == "http://":
src_file = HttpReplay(f)
else:
- src_file =
open(f.split(":")[0], "r", 0
)
+ src_file =
FileReplay(f.split(":")[0]
)
if len(f.split(":")) == 2:
max_moves = int(f.split(":")[1])
if len(f.split(":")) == 2:
max_moves = int(f.split(":")[1])
@@
-270,6
+272,8
@@
def main(argv):
if src_file != None and src_file != sys.stdin:
src_file.close()
if src_file != None and src_file != sys.stdin:
src_file.close()
+ sys.stdout.write(game.final_result + "\n")
+
return error
# This is how python does a main() function...
return error
# This is how python does a main() function...
UCC
git Repository :: git.ucc.asn.au