コード例 #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
ファイル: Pawn.py プロジェクト: SirPython/WizardsChess
	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
ファイル: KingPiece.py プロジェクト: Niv-Kor/RoyalOrders
 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
ファイル: King.py プロジェクト: Angelo404/Machine-Learning2
	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
ファイル: Pawn.py プロジェクト: rcc913/College_Projects
 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
ファイル: Rook.py プロジェクト: SirPython/WizardsChess
	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
ファイル: Queen.py プロジェクト: SirPython/WizardsChess
	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
ファイル: Null.py プロジェクト: rcc913/College_Projects
 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
ファイル: QueenPiece.py プロジェクト: Niv-Kor/RoyalOrders
 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)