Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. @Test
  2. public void testUpdateBoardStateCheckWithCapture() throws InvalidMoveException {
  3. // given
  4. Board board = new Board();
  5. board.getMoveHistory().add(createDummyMove(board));
  6. board.setPieceAt(Piece.WHITE_ROOK, new Coordinate(1, 0));
  7. board.setPieceAt(Piece.WHITE_ROOK, new Coordinate(0, 1));
  8. board.setPieceAt(Piece.BLACK_KING, new Coordinate(0, 4));
  9. board.setPieceAt(Piece.BLACK_ROOK, new Coordinate(1, 4));
  10.  
  11. // when
  12. BoardManager boardManager = new BoardManager(board);
  13. BoardState boardState = boardManager.updateBoardState();
  14.  
  15. // then
  16. assertEquals(BoardState.CHECK, boardState);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement