Пример #1
0
 def __init__(self, chess_coord, colour, move_direction):
     if colour is white:
         Piece.__init__(self, chess_coord, colour, 'P', '♙', [move_direction])
     else:
         Piece.__init__(self, chess_coord, colour, 'P', '♟', [move_direction])
     self.en_passant_square = None
     self.my_direction = self.move_directions[0]
Пример #2
0
 def __init__(self, chess_coord, colour):
     if colour is white:
         Piece.__init__(self, chess_coord, white, 'Q', '♕', move_directions_queen())
     else:
         Piece.__init__(self, chess_coord, black, 'Q', '♛', move_directions_queen())
Пример #3
0
 def __init__(self, color):
     Piece.__init__(self, color)
     self.name = color + '_' + 'N'
Пример #4
0
 def __init__(self, colour, position, board):
     Piece.__init__(self, "king", colour, position, board)
     self.directions = [(x, y) for x in [-1, 0, 1] for y in [-1, 0, 1]]
Пример #5
0
 def __init__(self, chess_coord, colour):
     if colour is white:
         Piece.__init__(self, chess_coord, white, 'B', '♗', move_directions_bishop())
     else:
         Piece.__init__(self, chess_coord, black, 'B', '♝', move_directions_bishop())
Пример #6
0
 def __init__(self, colour, position, board):
     Piece.__init__(self, "knight", colour, position, board)
Пример #7
0
 def __init__(self, alliance, position):
     Piece.__init__(self, alliance)
     self.alliance = alliance
     self.position = position
Пример #8
0
 def __init__(self, color):
     Piece.__init__(self, color)
     self.name = color + '_' + 'P'
     self.count = 0
Пример #9
0
 def __init__(self, alliance, position):
     Piece.__init__(self, alliance)
     self.alliance = alliance
     self.position = position
     self.original_square = position
Пример #10
0
 def __init__(self, colour, position, board):
     Piece.__init__(self, "pawn", colour, position, board)
Пример #11
0
 def __init__(self, chess_coord, colour):
     if colour is white:
         Piece.__init__(self, chess_coord, white, 'R', '♖', move_directions_rook())
     else:
         Piece.__init__(self, chess_coord, black, 'R', '♜', move_directions_rook())