()
| 197 | } |
| 198 | |
| 199 | @Test |
| 200 | public void pawnPromoteToKnight() { |
| 201 | Board board = new Board(); |
| 202 | board.placeKing(4, 0, Color.WHITE); |
| 203 | board.placeKing(3, 7, Color.BLACK); |
| 204 | board.placePawn(1, 1, Color.BLACK); |
| 205 | board.playerToMove = Color.BLACK; |
| 206 | System.out.println(board); |
| 207 | System.out.println(board.getPiece(1, 1).getMoveList(board)); |
| 208 | System.out.println(board.getLegalMoves()); |
| 209 | board.makeMove(Move.get(board.getPiece(1, 1), Cell.get(0, 1), false, null, PieceType.KNIGHT)); |
| 210 | System.out.println(board); |
| 211 | System.out.println(board.getLegalMoves()); |
| 212 | Assert.assertTrue(board.playerPieces.get(Color.BLACK).stream().anyMatch(piece -> piece.sameType(PieceType.KNIGHT))); |
| 213 | } |
| 214 | |
| 215 | @Test |
| 216 | public void kingAndQueenOut() { |
nothing calls this directly
no test coverage detected