Ejemplo n.º 1
0
        public void GeneratesCorrectQueenMovesBlack()
        {
            // Assemble
            var board = new Board
            {
                WhitePawns   = 0x00_00_00_08_00_10_c1_00,
                WhiteRooks   = 0x00_00_00_00_00_20_00_08,
                WhiteKnights = 0x00_00_00_00_80_00_00_00,
                WhiteQueens  = 0x00_00_10_00_00_00_00_00,
                WhiteKing    = 0x00_00_00_00_00_00_00_40,
                BlackPawns   = 0x00_c2_28_10_00_04_00_00,
                BlackBishops = 0x00_00_00_00_02_00_00_00,
                BlackRooks   = 0x80_00_00_00_00_00_00_00,
                BlackQueens  = 0x00_00_00_00_02_00_00_00,
                BlackKing    = 0x00_00_80_00_00_00_00_00
            };

            var position = new Position(board, Side.Black, null, CastlingRights.None, 0);
            var moves    = new List <Move>();

            // Act
            MoveGenerator.AddQueenMoves(position, moves);

            // Assert
            moves.Should().HaveCount(15);
            moves.Where(m => m.From == Square.b4).Should().HaveCount(15);
            moves.Where(m => m.IsCapture).Should().HaveCount(1);
        }
Ejemplo n.º 2
0
 public void GetQueenMoves() => MoveGenerator.AddQueenMoves(_position, new List <Move>());