Beispiel #1
0
    def getMoves(self, board):
        possibleMoves = getKingMoves(self.pos, board, self.colour, self.moveNo)
        possibleMoves = removeKingTake(board, self.colour, possibleMoves)

        allMoves = checkAllMoves(board, self.colour)

        print(possibleMoves, allMoves)

        for move in possibleMoves:
            if move in allMoves:
                possibleMoves.remove(move)

        return possibleMoves
Beispiel #2
0
 def getMoves(self, board):
     possibleMoves = getKnightMoves(self.pos, board, self.colour)
     possibleMoves = removeKingTake(board, self.colour, possibleMoves)
     return possibleMoves
Beispiel #3
0
 def getMoves(self, board):
     possibleMoves = getRookMoves(self.pos, board,
                                  self.colour) + getBishopMoves(
                                      self.pos, board, self.colour)
     possibleMoves = removeKingTake(board, self.colour, possibleMoves)
     return possibleMoves
Beispiel #4
0
 def getMoves(self, board):
     possibleMoves = getPawnMoves(self.pos, board, self.colour, self.moveNo)
     possibleMoves = removeKingTake(board, self.colour, possibleMoves)
     return possibleMoves