Ejemplo n.º 1
0
 def opIsChecked (self):
     if self.variant == SUICIDECHESS:
         return False
     elif self.variant == ATOMICCHESS:
         if not self.boards[1-self.color][KING]:
             return False
     if self.opchecked == None:
         kingcord = self.kings[1-self.color]
         self.opchecked = isAttacked (self, kingcord, self.color, ischecked=True)
     return self.opchecked
Ejemplo n.º 2
0
 def opIsChecked (self):
     if self.opchecked == None:
         kingcord = self.kings[1-self.color]
         self.opchecked = isAttacked (self, kingcord, self.color)
     return self.opchecked
Ejemplo n.º 3
0
 def isChecked (self):
     if self.checked == None:
         kingcord = self.kings[self.color]
         self.checked = isAttacked (self, kingcord, 1-self.color)
     return self.checked
Ejemplo n.º 4
0
 def opIsChecked(self):
     if self.opchecked == None:
         kingcord = self.kings[1 - self.color]
         self.opchecked = isAttacked(self, kingcord, self.color)
     return self.opchecked
Ejemplo n.º 5
0
 def isChecked(self):
     if self.checked == None:
         kingcord = self.kings[self.color]
         self.checked = isAttacked(self, kingcord, 1 - self.color)
     return self.checked