Beispiel #1
0
        public static ulong GenerateMovesForPieceBitboard(int piece, int[] board)
        {
            PieceType pt = Util.GetPieceType(piece);

            switch (pt)
            {
            case PieceType.Pawn:
                return(PawnMoveGenerator.PossiblePositionsBitboard(piece, board));

            case PieceType.Night:
                return(KnightMoveGenerator.PossiblePositionsBitboard(piece, board));

            case PieceType.Bishop:
                return(BishopMoveGenerator.PossiblePositionsBitboard(piece, board));

            case PieceType.Rook:
                return(RookMoveGenerator.PossiblePositionsBitboard(piece, board));

            case PieceType.Queen:
                return(QueenMoveGenerator.PossiblePositionsBitboard(piece, board));

            case PieceType.King:
                return(KingMoveGenerator.PossiblePositionsBitboard(piece, board));

            default:
                break;
            }
            return(0);
        }
Beispiel #2
0
 public static ulong PossiblePositionsBitboard(int piece, int[] board)
 {
     return(BishopMoveGenerator.PossiblePositionsBitboard(piece, board) | RookMoveGenerator.PossiblePositionsBitboard(piece, board));
 }