|
@ -504,4 +504,21 @@ public class GameServiceTest { |
|
|
assertTrue(gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().get(i).isFacedown()); |
|
|
assertTrue(gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().get(i).isFacedown()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
@DisplayName("CheckIfCardsPlayedByBotWillTurnFaceUp") |
|
|
|
|
|
public void CheckIfCardsPlayedByBotWillTurnFaceUp() { |
|
|
|
|
|
GameService gameService = new GameService(); |
|
|
|
|
|
|
|
|
|
|
|
Card card = new Card().setColor(Card.Color.GREEN).setValue(Card.Value.FOUR).setFacedown(true); |
|
|
|
|
|
|
|
|
|
|
|
gameService.getGame().getPlayerService().setCurrentTurn(false); |
|
|
|
|
|
gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.GREEN).setValue(Card.Value.FIVE)); |
|
|
|
|
|
gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().clear(); |
|
|
|
|
|
gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().add(card); |
|
|
|
|
|
|
|
|
|
|
|
gameService.getGame().getPlayerService().botMove(); |
|
|
|
|
|
|
|
|
|
|
|
assertFalse(gameService.getGame().getLastPlayedCard().isFacedown()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |