MCPcopy Index your code
hub / github.com/coding-parrot/chess-engine / canCaptureEnPassant

Method canCaptureEnPassant

src/test/java/PawnTest.java:96–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 }
95
96 @Test
97 public void canCaptureEnPassant() {
98 final Board board = new Board();
99 board.placePawn(4, 6, Color.WHITE);
100 board.placePawn(4, 5, Color.BLACK);
101 board.placePawn(4, 7, Color.BLACK);
102 board.moveList.add(Move.get(Piece.get(Color.BLACK, Cell.get(6, 5), PieceType.PAWN), Cell.get(4, 5), false));
103 System.out.println(board);
104 System.out.println(board.getPiece(4, 6).getMoveList(board));
105 Assert.assertEquals(2, board.getPiece(4, 6).getMoveList(board).size());
106 }
107
108 @Test
109 public void cannotCaptureEnPassantOnNextTurn() {

Callers

nothing calls this directly

Calls 6

placePawnMethod · 0.95
getMethod · 0.95
getMethod · 0.95
getMethod · 0.95
getPieceMethod · 0.95
getMoveListMethod · 0.45

Tested by

no test coverage detected