示例#1
0
文件: King.py 项目: LucasFenaux/Chess
 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
文件: Pieces.py 项目: PGLaffey/Hub
 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
文件: King.py 项目: joeadams0/PChess
 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
文件: Rook.py 项目: jadmz/PChess
	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
文件: Knight.py 项目: jadmz/PChess
	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
文件: Queen.py 项目: am1081/Chess2Py
	def __init__(self,team):
		self.name = "Q" + str(team)
		Piece.__init__(self,team)
示例#30
0
文件: Bishop.py 项目: jadmz/PChess
	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
文件: Queen.py 项目: jadmz/PChess
	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)