Browse Source

addCheckForWinner

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

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

@ -89,6 +89,11 @@ public class GameService {
drawCard(2); drawCard(2);
break; break;
} }
if (this.game.getPlayerService().getPlayerList().getFirst().getPlayerDeck().isEmpty()) {
System.out.println("Player wins");
} else if (this.game.getPlayerService().getPlayerList().getLast().getPlayerDeck().isEmpty()) {
System.out.println("Bot wins");
}
} }
public boolean legalMove(Card card) { public boolean legalMove(Card card) {

Loading…
Cancel
Save