Browse Source

setFirstCard

main
fdai7793 11 months ago
parent
commit
eecd2fc130
  1. 8
      src/main/java/de/hsfulda/onses/services/GameService.java

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

@ -13,6 +13,14 @@ public class GameService {
this.game.setGameService(this); this.game.setGameService(this);
fillDrawDeck(); fillDrawDeck();
shuffleDeck(); shuffleDeck();
for (int i = 0; i < this.game.getDrawCardDeck().size(); i++) {
Card card = this.game.getDrawCardDeck().get(i);
if (card.getColor() != Card.Color.BLACK) {
this.game.setLastPlayedCard(card);
break;
}
}
} }
public GameService() { public GameService() {
this(new Game()); this(new Game());

Loading…
Cancel
Save