X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fsrc%2Fpiece.py;h=a2faf9d39d0c1d44f68b1f715047bdff0485e638;hp=162e82e68a883c5821459475b186b4e06c653f5c;hb=87681496dec0b1bdadaf0733137010615997fb05;hpb=4e3cee35c67cb43df5d81ba8a0ecc2013d065379 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