| 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() { |