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)); } }
IEnumerable <FigureMove> NextKnightMove_BitMask() { ulong knightMoves = AllKnightMoves(); //knightMoves.ulong2ascii().Print(); foreach (Coord to in Bitboard.NextCoord(knightMoves)) { yield return(new FigureMove(figureCoord, to)); } }
IEnumerable <FigureMove> NextKingMove_BitMask() { ulong kingMoves = AllKingMoves(); //kingMoves.ULong2Ascii().Print(); foreach (Coord to in Bitboard.NextCoord(kingMoves)) { yield return(new FigureMove(figureCoord, to)); } }
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)); } }
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)); } }
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)); } }