Exemple #1
0
 def Move(self, row, col):
     "Move king to coordinates (row, col)."
     from pieces.black_funcs import Black_Funcs
     Black_ = Black_Funcs(None)
     if (self.row, self.col) != (-1, -1):
         Black.blocks[self.row][self.col] = 0
     Black.blocks[row][col] = 1
     self.col = col
     self.row = row
     self.x = Piece.paddingx + col * UNIT
     self.y = Piece.paddingy + row * UNIT
     if Black_.get_freeze() == False:
         self.moved = 1
Exemple #2
0
 def Move(self, i, row, col):
     "Move rook i to coordinates (row, col)."
     from pieces.black_funcs import Black_Funcs
     Black_ = Black_Funcs(None)
     if (self.row[i], self.col[i]) != (-1, -1):
         Black.blocks[self.row[i]][self.col[i]] = 0
     Black.blocks[row][col] = 1
     self.col[i] = col
     self.row[i] = row
     self.x[i] = Piece.paddingx + col * UNIT
     self.y[i] = Piece.paddingy + row * UNIT
     if Black_.get_freeze() == False:
         self.moved[i] = 1