From 996943bd7ecafaa6327851e77008c84f22a54654 Mon Sep 17 00:00:00 2001 From: Anteneh Denbel <112484153+Antenehden@users.noreply.github.com> Date: Sun, 11 Aug 2024 19:14:04 -0500 Subject: [PATCH] Update Game.java for winner logic --- src/main/java/uta/cse3310/Game.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/uta/cse3310/Game.java b/src/main/java/uta/cse3310/Game.java index 161961e..d6fafcb 100644 --- a/src/main/java/uta/cse3310/Game.java +++ b/src/main/java/uta/cse3310/Game.java @@ -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; } @@ -242,4 +238,4 @@ public boolean isGameActive() { public boolean hasPlayer(Player player) { return players.stream().anyMatch(p -> p.getId().equals(player.getId())); } -} \ No newline at end of file +}