Example #1
0
        public void CreatesBlackDoublePushTargetsCorrectly()
        {
            // Assemble
            Bitboard blackPawns   = 0x00_c7_20_10_08_10_00_00;
            Bitboard whitePieces  = 0x00_00_41_02_00_00_10_00;
            Bitboard emptySquares = ~(blackPawns | whitePieces);

            // Act
            Bitboard doublePushTargets = PawnMoves.PawnDoublePushTargets(blackPawns, emptySquares, Side.Black);

            // Assert
            Assert.Equal <Bitboard>(0x00_00_00_84_00_00_00_00, doublePushTargets);
        }
Example #2
0
        public void CreatesWhiteDoublePushTargetsCorrectly()
        {
            // Assemble
            Bitboard whitePawns   = 0x00_00_00_08_00_01_F6_00;
            Bitboard blackPieces  = 0x00_00_00_00_11_84_00_00;
            Bitboard emptySquares = ~(whitePawns | blackPieces);

            // Act
            Bitboard doublePushTargets = PawnMoves.PawnDoublePushTargets(whitePawns, emptySquares, Side.White);

            // Assert
            Assert.Equal <Bitboard>(0x00_00_00_00_62_00_00_00, doublePushTargets);
        }