Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 5
0
 def __init__(self, white, x, y):
     Piece.__init__(self, white, x, y)
Ejemplo n.º 6
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'king', color, size)
Ejemplo n.º 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)
Ejemplo n.º 8
0
 def __init__(self, xpos, ypos, team):
     Piece.__init__(self, xpos, ypos, team, "King", False, None)
Ejemplo n.º 9
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'bishop', color, size)
Ejemplo n.º 10
0
	def __init__(self, col, row, color, piece = "king"):	# color 1 => BLACK / color 0 => WHITE
		Piece.__init__(self, col, row, color, piece)
Ejemplo n.º 11
0
 def __init__(self, xpos, ypos, team):
     Piece.__init__(self, xpos, ypos, team, "Bishop", False, None)
Ejemplo n.º 12
0
	def __init__(self, team):
		self.name = 'SilverGen'
		self.team = team
		Piece.__init__(self, team, ["SilverGen", "GoldGen"])
Ejemplo n.º 13
0
	def __init__(self, team):
		self.name = 'GoldGen'
		self.team = team
		Piece.__init__(self, team)
Ejemplo n.º 14
0
	def __init__(self, team):
		self.name = 'Bishop'
		self.team = team
		Piece.__init__(self, team, ["DragonHorse"])
Ejemplo n.º 15
0
 def __init__(self):
     Piece.__init__(self)
     self.init_loc = True
Ejemplo n.º 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")
Ejemplo n.º 17
0
	def __init__(self, image, team):
		Piece.__init__(self, image, team)
Ejemplo n.º 18
0
 def __init__(self,name,color,posLine,posColumn,image):
     Piece.__init__(self,name,color,posLine,posColumn,image)
Ejemplo n.º 19
0
	def __init__(self, name, color, ID, location, deathLoc):
		Piece.__init__(self, name, color, ID, location, deathLoc)
Ejemplo n.º 20
0
 def __init__(self, team):
     self.name = 'Rook'
     self.team = team
     Piece.__init__(self, team, ["DragonKing"])
Ejemplo n.º 21
0
	def __init__(self, name, color, ID, location, deathLoc):
		Piece.__init__(self, name, color, ID, location, deathLoc)
		self.posMoves = [] #List of possible moves
Ejemplo n.º 22
0
	def __init__(self, image, orientation, team):
		Piece.__init__(self, image, team)
		self.orientation = orientation
Ejemplo n.º 23
0
Archivo: Rook.py Proyecto: jadmz/PChess
	def __init__(self, xpos, ypos, team):
		Piece.__init__(self,xpos,ypos,team,"Rook", False, None)
Ejemplo n.º 24
0
 def __init__(self):
     Piece.__init__(self)
Ejemplo n.º 25
0
 def __init__(self, team):
     self.name = 'Pawn'
     Piece.__init__(self, team, ["GoldGen", "SilverGen"])
Ejemplo n.º 26
0
	def __init__(self, xpos, ypos,team):
		Piece.__init__(self,xpos,ypos,team, "Knight", True, None)
Ejemplo n.º 27
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'rook', color, size)
Ejemplo n.º 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)
Ejemplo n.º 29
0
	def __init__(self,team):
		self.name = "Q" + str(team)
		Piece.__init__(self,team)
Ejemplo n.º 30
0
	def __init__(self, xpos,ypos, team):
		Piece.__init__(self,xpos,ypos,team, "Bishop", False, None)
Ejemplo n.º 31
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'knight', color, size)
Ejemplo n.º 32
0
 def __init__(self, board, color, size):
     Piece.__init__(self, board, 'queen', color, size)
Ejemplo n.º 33
0
	def __init__(self,xpos,ypos,team):

		Piece.__init__(self,xpos,ypos,team, "Queen", False, None)
Ejemplo n.º 34
0
    def __init__(self, xpos, ypos, team):

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