X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=qchess%2Fsrc%2Fpiece.py;h=a2faf9d39d0c1d44f68b1f715047bdff0485e638;hb=1da52d4a75c75ddff22f3a67a2c06875b335e601;hp=162e82e68a883c5821459475b186b4e06c653f5c;hpb=4e3cee35c67cb43df5d81ba8a0ecc2013d065379;p=progcomp2013.git diff --git a/qchess/src/piece.py b/qchess/src/piece.py index 162e82e..a2faf9d 100644 --- a/qchess/src/piece.py +++ b/qchess/src/piece.py @@ -19,7 +19,7 @@ class Piece(): self.move_pattern = None self.coverage = None - self.possible_moves = None + self.possible_moves = {} def init_from_copy(self, c): @@ -58,7 +58,10 @@ class Piece(): # Draw the two possible types underneath the current_type image for i in range(len(self.types)): if always_reveal_states == True or self.types[i][0] != '?': - img = small_images[self.colour][self.types[i]] + if self.types[i][0] == '?': + img = small_images[self.colour][self.types[i][1:]] + else: + 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