X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fqchess.py;h=3554da5528587b2c693948a92e017c63145d9c51;hp=ced6001689cd5f7c24f84928540bcba60c5434d9;hb=559edeecb292c9971ddd8226e132e1bf1d2640e1;hpb=8ac03672ef496924adb437b66c75d70d9e2bcde3 diff --git a/qchess/qchess.py b/qchess/qchess.py index ced6001..3554da5 100755 --- a/qchess/qchess.py +++ b/qchess/qchess.py @@ -76,7 +76,7 @@ class Piece(): # Collapses the wave function! def select(self): - if self.current_type == "unknown": + if self.current_type == "unknown" or not self.choice in [0,1]: self.choice = random.randint(0,1) if self.types[self.choice][0] == '?': self.types[self.choice] = self.types[self.choice][1:] @@ -2546,4 +2546,4 @@ if __name__ == "__main__": sys.exit(102) # --- main.py --- # -# EOF - created from make on Tue Feb 12 17:06:37 WST 2013 +# EOF - created from make on Mon Feb 25 21:46:16 WST 2013