()
| 181 | } |
| 182 | |
| 183 | @Test |
| 184 | public void pawnPromotion() { |
| 185 | Board board = new Board(); |
| 186 | board.placeKing(4, 0, Color.WHITE); |
| 187 | board.placeKing(3, 7, Color.BLACK); |
| 188 | board.placePawn(1, 1, Color.BLACK); |
| 189 | board.playerToMove = Color.BLACK; |
| 190 | System.out.println(board); |
| 191 | System.out.println(board.getPiece(1, 1).getMoveList(board)); |
| 192 | System.out.println(board.getLegalMoves()); |
| 193 | board.makeMove(Move.get(board.getPiece(1, 1), Cell.get(0, 1), false, null, PieceType.QUEEN)); |
| 194 | System.out.println(board); |
| 195 | System.out.println(board.getLegalMoves()); |
| 196 | Assert.assertTrue(board.playerPieces.get(Color.BLACK).stream().anyMatch(piece -> piece.sameType(PieceType.QUEEN))); |
| 197 | } |
| 198 | |
| 199 | @Test |
| 200 | public void pawnPromoteToKnight() { |
nothing calls this directly
no test coverage detected