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
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
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)
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)
def __init__(self, white, x, y): Piece.__init__(self, white, x, y)
def __init__(self, board, color, size): Piece.__init__(self, board, 'king', color, size)
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)
def __init__(self, xpos, ypos, team): Piece.__init__(self, xpos, ypos, team, "King", False, None)
def __init__(self, board, color, size): Piece.__init__(self, board, 'bishop', color, size)
def __init__(self, col, row, color, piece = "king"): # color 1 => BLACK / color 0 => WHITE Piece.__init__(self, col, row, color, piece)
def __init__(self, xpos, ypos, team): Piece.__init__(self, xpos, ypos, team, "Bishop", False, None)
def __init__(self, team): self.name = 'SilverGen' self.team = team Piece.__init__(self, team, ["SilverGen", "GoldGen"])
def __init__(self, team): self.name = 'GoldGen' self.team = team Piece.__init__(self, team)
def __init__(self, team): self.name = 'Bishop' self.team = team Piece.__init__(self, team, ["DragonHorse"])
def __init__(self): Piece.__init__(self) self.init_loc = True
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")
def __init__(self, image, team): Piece.__init__(self, image, team)
def __init__(self,name,color,posLine,posColumn,image): Piece.__init__(self,name,color,posLine,posColumn,image)
def __init__(self, name, color, ID, location, deathLoc): Piece.__init__(self, name, color, ID, location, deathLoc)
def __init__(self, team): self.name = 'Rook' self.team = team Piece.__init__(self, team, ["DragonKing"])
def __init__(self, name, color, ID, location, deathLoc): Piece.__init__(self, name, color, ID, location, deathLoc) self.posMoves = [] #List of possible moves
def __init__(self, image, orientation, team): Piece.__init__(self, image, team) self.orientation = orientation
def __init__(self, xpos, ypos, team): Piece.__init__(self,xpos,ypos,team,"Rook", False, None)
def __init__(self): Piece.__init__(self)
def __init__(self, team): self.name = 'Pawn' Piece.__init__(self, team, ["GoldGen", "SilverGen"])
def __init__(self, xpos, ypos,team): Piece.__init__(self,xpos,ypos,team, "Knight", True, None)
def __init__(self, board, color, size): Piece.__init__(self, board, 'rook', color, size)
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)
def __init__(self,team): self.name = "Q" + str(team) Piece.__init__(self,team)
def __init__(self, xpos,ypos, team): Piece.__init__(self,xpos,ypos,team, "Bishop", False, None)
def __init__(self, board, color, size): Piece.__init__(self, board, 'knight', color, size)
def __init__(self, board, color, size): Piece.__init__(self, board, 'queen', color, size)
def __init__(self,xpos,ypos,team): Piece.__init__(self,xpos,ypos,team, "Queen", False, None)
def __init__(self, xpos, ypos, team): Piece.__init__(self, xpos, ypos, team, "Queen", False, None)