Browse Source

refactoring: fillPlayerDecks

main
fdai7793 11 months ago
parent
commit
3d03ea8a8c
  1. 19
      src/main/java/de/hsfulda/onses/services/GameService.java

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

@ -15,14 +15,7 @@ public class GameService {
fillDrawDeck(); fillDrawDeck();
shuffleDeck(); shuffleDeck();
setFirstCard(); setFirstCard();
for (int i = 0; i < 7; i++) {
this.drawCard(1);
this.nextPlayer();
this.drawCard(1);
this.nextPlayer();
}
fillPlayerDecks();
} }
public GameService() { public GameService() {
@ -151,4 +144,14 @@ public class GameService {
} }
} }
public void fillPlayerDecks() {
for (int i = 0; i < 7; i++) {
this.drawCard(1);
this.nextPlayer();
this.drawCard(1);
this.nextPlayer();
}
}
} }
Loading…
Cancel
Save