assertEquals(baseMoves + 2, new MoveGenerator(board).getAllRemainingMoves().size());
}
@Test
public void pawnCaptures() {
BitBoard board = FENUtils.getBoard("7k/7p/8/bp1n2P1/1PP1P3/8/8/7K w - - 0 1");
List<BitBoardMove> rv = new ArrayList<BitBoardMove>();
new PawnCaptureGenerator().generateMoves(board, false, -1L, rv);
assertEquals(4, rv.size());
String fen = "7k/7p/8/bp1n2P1/1PP1P3/8/8/7K b - - 0 1";
board = FENUtils.getBoard(fen);
PGNUtils.applyMove(board, "h5");
assertTrue(board.isEnPassant());
assertEquals(7, board.getEnPassantFile());
assertEquals(5, board.getEnPassantRank());
rv.clear();
new PawnCaptureGenerator().generateMoves(board, false, -1L, rv);
assertEquals(5, rv.size());
board = board.reverse();
rv.clear();
new PawnCaptureGenerator().generateMoves(board, false, -1L, rv);
assertEquals(5, rv.size());
assertTrue(board.isEnPassant());
assertEquals(7, board.getEnPassantFile());
assertEquals(2, board.getEnPassantRank());
}