public ulong PawnsAbleToDoublePushUp(ulong emptySquares) { ulong rank4 = 0x00000000FF000000UL; ulong emptyRank3 = BitBoardHelper.ShiftSouthOne(emptySquares & rank4) & emptySquares; return(this.PawnsAbleToPushUp(emptyRank3)); }
public ulong DoubleDownPushTargets(ulong emptySquares) { ulong rank5 = 0x000000FF00000000UL; ulong singlePushs = this.SingleDownPushTargets(emptySquares); return(BitBoardHelper.ShiftSouthOne(singlePushs) & emptySquares & rank5); }
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); }
public ulong PawnsAbleToPushUp(ulong emptySquares) { return(BitBoardHelper.ShiftSouthOne(emptySquares) & this.board); }
public ulong SingleDownPushTargets(ulong emptySquares) { return(BitBoardHelper.ShiftSouthOne(this.board) & emptySquares); }
// all pawns that are blocked by the opponent's pawns public ulong UpRam(PawnBitBoard opponentPawns) { return(BitBoardHelper.ShiftSouthOne(opponentPawns.board) & this.board); }