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
/
player.py
diff --git
a/qchess/src/player.py
b/qchess/src/player.py
index
346674b
..
fffa738
100644
(file)
--- 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(" "))
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
except:
sys.stderr.write("ILLEGAL GIBBERISH\n")
continue
+
# It's your move captain
def get_move(self):
if isinstance(graphics, GraphicsThread):
# 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(" "))
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
except:
sys.stderr.write("ILLEGAL GIBBERISH\n")
continue
UCC
git Repository :: git.ucc.asn.au