Exemple #1
0
        public ulong PawnsAbleToDoublePushUp(ulong emptySquares)
        {
            ulong rank4      = 0x00000000FF000000UL;
            ulong emptyRank3 = BitBoardHelper.ShiftSouthOne(emptySquares & rank4) & emptySquares;

            return(this.PawnsAbleToPushUp(emptyRank3));
        }
Exemple #2
0
        public ulong DoubleDownPushTargets(ulong emptySquares)
        {
            ulong rank5       = 0x000000FF00000000UL;
            ulong singlePushs = this.SingleDownPushTargets(emptySquares);

            return(BitBoardHelper.ShiftSouthOne(singlePushs) & emptySquares & rank5);
        }
Exemple #3
0
        private ulong GetKingMoves(int i, int j)
        {
            int   index      = i * 8 + j;
            ulong initialPos = 1UL << index;

            ulong board = initialPos;

            ulong attacks = BitBoardHelper.ShiftEastOne(board) | BitBoardHelper.ShiftWestOne(board);

            board    = initialPos | attacks;
            attacks |= BitBoardHelper.ShiftNorthOne(board) | BitBoardHelper.ShiftSouthOne(board);
            return(attacks);
        }
Exemple #4
0
 public ulong PawnsAbleToPushUp(ulong emptySquares)
 {
     return(BitBoardHelper.ShiftSouthOne(emptySquares) & this.board);
 }
Exemple #5
0
 public ulong SingleDownPushTargets(ulong emptySquares)
 {
     return(BitBoardHelper.ShiftSouthOne(this.board) & emptySquares);
 }
Exemple #6
0
 // all pawns that are blocked by the opponent's pawns
 public ulong UpRam(PawnBitBoard opponentPawns)
 {
     return(BitBoardHelper.ShiftSouthOne(opponentPawns.board) & this.board);
 }