示例#1
0
        IEnumerable <FigureMove> NextQueenMove_BitMask(FigureCoord figureCoord)
        {
            ulong bishopMoves = AllQueenMoves(figureCoord);

            bishopMoves.ulong2ascii().Print();
            foreach (Coord to in Bitboard.NextCoord(bishopMoves))
            {
                yield return(new FigureMove(figureCoord, to));
            }
        }
示例#2
0
        IEnumerable <FigureMove> NextKnightMove_BitMask()
        {
            ulong knightMoves = AllKnightMoves();

            //knightMoves.ulong2ascii().Print();
            foreach (Coord to in Bitboard.NextCoord(knightMoves))
            {
                yield return(new FigureMove(figureCoord, to));
            }
        }
示例#3
0
        IEnumerable <FigureMove> NextKingMove_BitMask()
        {
            ulong kingMoves = AllKingMoves();

            //kingMoves.ULong2Ascii().Print();
            foreach (Coord to in Bitboard.NextCoord(kingMoves))
            {
                yield return(new FigureMove(figureCoord, to));
            }
        }
示例#4
0
        IEnumerable <FigureMove> NextRookMove_BitMask(FigureCoord figureCoord)
        {
            ulong rookMoves = AllRookSlides(figureCoord);

            rookMoves.ulong2ascii().Print();
            foreach (Coord to in Bitboard.NextCoord(rookMoves))
            {
                yield return(new FigureMove(figureCoord, to));
            }
        }
示例#5
0
        IEnumerable <FigureMove> NextKingMove_Array64()
        {
            if (kingMovesArray == null)
            {
                kingMovesArray = new ulong[64];
                for (int j = 0; j < 64; j++)
                {
                    kingMovesArray[j] = AllKingSquares(1UL << j);
                }
            }
            ulong kingMoves = kingMovesArray [figureCoord.coord.xy];

            foreach (Coord to in Bitboard.NextCoord(kingMoves))
            {
                yield return(new FigureMove(figureCoord, to));
            }
        }
示例#6
0
        IEnumerable <FigureMove> NextKnightMove_Array64()
        {
            if (knightMovesArray == null)
            {
                knightMovesArray = new ulong[64];
                for (int j = 0; j < 64; j++)
                {
                    knightMovesArray[j] = AllKnightSquares(1UL << j);
                }
            }
            ulong knightMoves = knightMovesArray[figureCoord.coord.xy];

            //knightMoves.ulong2ascii().Print();
            foreach (Coord to in Bitboard.NextCoord(knightMoves))
            {
                yield return(new FigureMove(figureCoord, to));
            }
        }