From 3f407f0be20c1239c6f8e6ff75a06fbd2416bd02 Mon Sep 17 00:00:00 2001 From: CraivMan Date: Sat, 3 Dec 2022 23:11:17 -0600 Subject: Added round logic (PT 1) I did this all (100% without Myles) --- src/main/java/com/MylesAndMore/tumble/Game.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/MylesAndMore/tumble/Game.java') diff --git a/src/main/java/com/MylesAndMore/tumble/Game.java b/src/main/java/com/MylesAndMore/tumble/Game.java index ccbbc55..67eedca 100644 --- a/src/main/java/com/MylesAndMore/tumble/Game.java +++ b/src/main/java/com/MylesAndMore/tumble/Game.java @@ -165,9 +165,9 @@ public class Game { public void playerDeath(@NotNull Player player) { player.setGameMode(GameMode.SPECTATOR); // If there are more than 2 players in the game, - if (gamePlayers.size() > 2) { - // remove that player (who just died) from the gamePlayersArray, effectively eliminating them, - gamePlayers.remove(player); + if (roundPlayers.size() > 2) { + // remove that player (who just died) from the roundPlayersArray, effectively eliminating them, + roundPlayers.remove(player); } // otherwise, the game must have two people left (and one just died), meaning it is over // This logic is so that it will not remove the last player standing from the list, so we know who the winner is. -- cgit v1.2.3