aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/MylesAndMore/tumble/Game.java
diff options
context:
space:
mode:
authorMyles <mylesandmore9@gmail.com>2022-12-03 16:34:13 -0600
committerMyles <mylesandmore9@gmail.com>2022-12-03 16:34:13 -0600
commit6be45c6cdfb243fc872b7073729a755f8f1ee193 (patch)
treebc12e53df6cea5d0ce1fc635a4e4fed22638bd67 /src/main/java/com/MylesAndMore/tumble/Game.java
parentd2c33ffb6258e3197f455035087c3bb5a1b0d662 (diff)
downloadTumble-6be45c6cdfb243fc872b7073729a755f8f1ee193.tar.gz
Tumble-6be45c6cdfb243fc872b7073729a755f8f1ee193.tar.bz2
Tumble-6be45c6cdfb243fc872b7073729a755f8f1ee193.zip
carver is too good at bug fixing
Diffstat (limited to '')
-rw-r--r--src/main/java/com/MylesAndMore/tumble/Game.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/com/MylesAndMore/tumble/Game.java b/src/main/java/com/MylesAndMore/tumble/Game.java
index fd7e1a1..ccbbc55 100644
--- a/src/main/java/com/MylesAndMore/tumble/Game.java
+++ b/src/main/java/com/MylesAndMore/tumble/Game.java
@@ -153,9 +153,6 @@ public class Game {
// While there are still players in the lobby, send them to the gameWorld
// This is just a way of sending everybody in the lobby to the game
for (Player aPlayer : TumbleManager.getPlayersInLobby()) {
- //for (List<Player> playersInLobby = TumbleManager.getPlayersInLobby(); playersInLobby.size() > 0; playersInLobby = TumbleManager.getPlayersInLobby()) {
- // Get a singular player from the player list
- //Player aPlayer = playersInLobby.get(0);
// Get a singular location from the scatter list
Location aLocation = scatterLocations.get(0);
// Teleport that player to that scatter location
@@ -175,6 +172,7 @@ public class Game {
// 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.
else {
+ gamePlayers.remove(player);
// End the game, passing the winner to the gameEnd method
gameEnd(gamePlayers.get(0));
}
@@ -198,6 +196,6 @@ public class Game {
// Methods to get the game type and game state for other classes outside the Game
private String getGameType() { return gameType; }
- private String getGameState() { return gameState; }
+ public String getGameState() { return gameState; }
} \ No newline at end of file