Example #1
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);
        }
Example #2
0
 public ulong PawnsWithEastNeighbour()
 {
     return(this.board & BitBoardHelper.ShiftWestOne(this.board));
 }