public void GeneratesCorrectRookMovesBlack() { // Assemble var board = new Board { WhitePawns = 0x00_00_00_00_80_01_76_00, WhiteRooks = 0x00_00_00_00_00_80_00_08, WhiteKnights = 0x00_00_20_02_00_00_00_62, BlackPawns = 0x00_28_13_84_00_00_00_00, BlackRooks = 0x00_10_00_00_00_02_00_00 }; var position = new Position(board, Side.Black, null, CastlingRights.None, 0); var moves = new List <Move>(); // Act MoveGenerator.AddRookMoves(position, moves); // Assert moves.Should().HaveCount(11); moves.Where(m => m.From == Square.b3).Should().HaveCount(10); moves.Where(m => m.From == Square.e7).Should().HaveCount(1); moves.Where(m => m.IsCapture).Should().HaveCount(4); }
public void GetRookMoves() => MoveGenerator.AddRookMoves(_position, new List <Move>());