Пример #1
0
 def __init__(self, board_square, color, board):
     Piece.__init__(self, board_square, color, board)
     if color == 'black':
         self.image = pygame.image.load("../Display/Black King.png")
     else:
         self.image = pygame.image.load("../Display/White King.png")
     self.has_moved = False
Пример #2
0
	def __init__(self, name, color, ID, location, deathLoc):
		Piece.__init__(self, name, color, ID, location, deathLoc)
		self.just_moved_two = False
		self.updates_since_moved_two = 0
		self.on_fifth_rank = False
		self.can_en_passant_left = False
		self.can_en_passant_right = False
Пример #3
0
    def __init__(self, color):
        """Initializes the piece with the passed color."""

        possible_moves = [[2, 2], [2, -2], [-2, 2], [-2, -2]]
        possible_jumps = [[[1, 1]], [[1, -1]], [[-1, 1]], [[-1, -1]]]

        Piece.__init__(self, color, "E", possible_moves, possible_jumps)
Пример #4
0
    def __init__(self, color):
        """Initializes the piece with the passed color."""

        possible_moves = []
        possible_jumps = []

        for num in range(9):
            possible_moves.append([num + 1, 0])
            possible_jumps.append(self.find_jumps(num + 1, 0))

        for num in range(9):
            possible_moves.append([-1 - num, 0])
            possible_jumps.append(self.find_jumps(-1 - num, 0))

        for num in range(9):
            possible_moves.append([0, num + 1])
            possible_jumps.append(self.find_jumps(0, num + 1))

        for num in range(9):
            possible_moves.append([0, -1 - num])
            possible_jumps.append(self.find_jumps(0, -1 - num))

        Piece.__init__(self, color, "R", possible_moves, possible_jumps)
Пример #5
0
 def __init__(self, white, x, y):
     Piece.__init__(self, white, x, y)
Пример #6
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'king', color, size)
Пример #7
0
    def __init__(self, color):
        """Initializes the piece with the passed color."""

        possible_moves = [[1, 0], [-1, 0], [0, 1], [0, -1]]

        Piece.__init__(self, color, "G", possible_moves)
Пример #8
0
 def __init__(self, xpos, ypos, team):
     Piece.__init__(self, xpos, ypos, team, "King", False, None)
Пример #9
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'bishop', color, size)
Пример #10
0
	def __init__(self, col, row, color, piece = "king"):	# color 1 => BLACK / color 0 => WHITE
		Piece.__init__(self, col, row, color, piece)
Пример #11
0
 def __init__(self, xpos, ypos, team):
     Piece.__init__(self, xpos, ypos, team, "Bishop", False, None)
Пример #12
0
	def __init__(self, team):
		self.name = 'SilverGen'
		self.team = team
		Piece.__init__(self, team, ["SilverGen", "GoldGen"])
Пример #13
0
	def __init__(self, team):
		self.name = 'GoldGen'
		self.team = team
		Piece.__init__(self, team)
Пример #14
0
	def __init__(self, team):
		self.name = 'Bishop'
		self.team = team
		Piece.__init__(self, team, ["DragonHorse"])
Пример #15
0
 def __init__(self):
     Piece.__init__(self)
     self.init_loc = True
Пример #16
0
 def __init__(self, board_square, color, board):
     Piece.__init__(self, board_square, color, board)
     if color == 'black':
         self.image = pygame.image.load("../Display/Black Bishop.png")
     else:
         self.image = pygame.image.load("../Display/White Bishop.png")
Пример #17
0
	def __init__(self, image, team):
		Piece.__init__(self, image, team)
Пример #18
0
 def __init__(self,name,color,posLine,posColumn,image):
     Piece.__init__(self,name,color,posLine,posColumn,image)
Пример #19
0
	def __init__(self, name, color, ID, location, deathLoc):
		Piece.__init__(self, name, color, ID, location, deathLoc)
Пример #20
0
 def __init__(self, team):
     self.name = 'Rook'
     self.team = team
     Piece.__init__(self, team, ["DragonKing"])
Пример #21
0
	def __init__(self, name, color, ID, location, deathLoc):
		Piece.__init__(self, name, color, ID, location, deathLoc)
		self.posMoves = [] #List of possible moves
Пример #22
0
	def __init__(self, image, orientation, team):
		Piece.__init__(self, image, team)
		self.orientation = orientation
Пример #23
0
	def __init__(self, xpos, ypos, team):
		Piece.__init__(self,xpos,ypos,team,"Rook", False, None)
Пример #24
0
 def __init__(self):
     Piece.__init__(self)
Пример #25
0
 def __init__(self, team):
     self.name = 'Pawn'
     Piece.__init__(self, team, ["GoldGen", "SilverGen"])
Пример #26
0
	def __init__(self, xpos, ypos,team):
		Piece.__init__(self,xpos,ypos,team, "Knight", True, None)
Пример #27
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'rook', color, size)
Пример #28
0
 def __init__(self, white, pos):
     image_path = imagePathWhite if white else imagePathBlack
     image = pygame.image.load(image_path)
     Piece.__init__(self, white, image_path, image, pos, 10)
Пример #29
0
	def __init__(self,team):
		self.name = "Q" + str(team)
		Piece.__init__(self,team)
Пример #30
0
	def __init__(self, xpos,ypos, team):
		Piece.__init__(self,xpos,ypos,team, "Bishop", False, None)
Пример #31
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'knight', color, size)
Пример #32
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'queen', color, size)
Пример #33
0
	def __init__(self,xpos,ypos,team):

		Piece.__init__(self,xpos,ypos,team, "Queen", False, None)
Пример #34
0
    def __init__(self, xpos, ypos, team):

        Piece.__init__(self, xpos, ypos, team, "Queen", False, None)