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
Added sample agent + log file writing/parsing
[progcomp2013.git]
/
qchess
/
src
/
piece.py
diff --git
a/qchess/src/piece.py
b/qchess/src/piece.py
index
d9acef2
..
400a79a
100644
(file)
--- a/
qchess/src/piece.py
+++ b/
qchess/src/piece.py
@@
-38,7
+38,7
@@
class Piece():
# Make a string for the piece (used for debug)
def __str__(self):
# Make a string for the piece (used for debug)
def __str__(self):
- return str(self.current_type) + " " + str(self.types) + " at " + str(self.x) + ","+str(self.y)
+ return str(self.c
olour) + " " + str(self.c
urrent_type) + " " + str(self.types) + " at " + str(self.x) + ","+str(self.y)
# Draw the piece in a pygame surface
def draw(self, window, grid_sz = [80,80], style="quantum"):
# Draw the piece in a pygame surface
def draw(self, window, grid_sz = [80,80], style="quantum"):
@@
-58,7
+58,7
@@
class Piece():
# Draw the two possible types underneath the current_type image
for i in range(len(self.types)):
# Draw the two possible types underneath the current_type image
for i in range(len(self.types)):
- if self.types_revealed[i] == True:
+ if
always_reveal_states == True or
self.types_revealed[i] == True:
img = small_images[self.colour][self.types[i]]
else:
img = small_images[self.colour]["unknown"] # If the type hasn't been revealed, show a placeholder
img = small_images[self.colour][self.types[i]]
else:
img = small_images[self.colour]["unknown"] # If the type hasn't been revealed, show a placeholder
UCC
git Repository :: git.ucc.asn.au