Skip to content

Commit

Permalink
Update Game.java for winner logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Antenehden authored Aug 12, 2024
1 parent 862be8c commit 996943b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/uta/cse3310/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,11 @@ public void playRound() {
}

public void endGame(Player player) {
this.isGameActive = false;
stats.incrementGamesPlayed();
stats.updateWinner(player);
}

public void endGame() {
stats.incrementGamesPlayed();
//stats.updateWinner(player);
}

public Statistics getStatistics() {
return stats;
}
Expand Down Expand Up @@ -242,4 +238,4 @@ public boolean isGameActive() {
public boolean hasPlayer(Player player) {
return players.stream().anyMatch(p -> p.getId().equals(player.getId()));
}
}
}

0 comments on commit 996943b

Please sign in to comment.