Browse Source

add fillDrawCardDeck to Constuctor

main
fdai7906 11 months ago
parent
commit
a9e53387a2
  1. 2
      src/main/java/de/hsfulda/onses/services/GameService.java
  2. 2
      src/test/java/de/hsfulda/onses/GameServiceTest.java

2
src/main/java/de/hsfulda/onses/services/GameService.java

@ -11,6 +11,8 @@ public class GameService {
public GameService(Game game) {
this.game = game;
this.game.setGameService(this);
fillDrawDeck();
shuffleDeck();
}
public GameService() {
this(new Game());

2
src/test/java/de/hsfulda/onses/GameServiceTest.java

@ -68,7 +68,7 @@ public class GameServiceTest {
@DisplayName("FillDrawCardDeck")
public void FillDrawCardDeck() {
GameService gameService = new GameService();
int expected = 112;
int expected = gameService.getGame().getDrawCardDeck().size() + 112;
gameService.fillDrawDeck();
int answer = gameService.getGame().getDrawCardDeck().size();

Loading…
Cancel
Save