diff --git a/src/main/java/com/cse3310/App.java b/src/main/java/com/cse3310/App.java index fd21377..232b677 100644 --- a/src/main/java/com/cse3310/App.java +++ b/src/main/java/com/cse3310/App.java @@ -3,10 +3,7 @@ import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; -import java.io.InputStreamReader; import java.net.InetSocketAddress; -import java.net.UnknownHostException; -import java.nio.ByteBuffer; import java.util.Collections; import java.util.ArrayList; import java.util.Arrays; @@ -411,8 +408,10 @@ public void forceDisconnect(int GameId) { } } - for (User u : disconnectUsers) { - ActiveUsers.remove(ActiveUsers.indexOf(u)); + if (disconnectUsers.isEmpty() != true) { + for (User u : disconnectUsers) { + ActiveUsers.remove(ActiveUsers.indexOf(u)); + } } } @@ -530,6 +529,5 @@ public static void main(String[] args) { } catch (NullPointerException e) { // Checks for environment variable e.printStackTrace(); } - } } diff --git a/src/main/java/com/cse3310/Game.java b/src/main/java/com/cse3310/Game.java index 6c10422..f104c56 100644 --- a/src/main/java/com/cse3310/Game.java +++ b/src/main/java/com/cse3310/Game.java @@ -2,8 +2,6 @@ import java.util.ArrayList; import java.util.Random; -import java.util.Collections; -import java.time.Clock; public class Game { diff --git a/target/classes/com/cse3310/App$LetterTimer.class b/target/classes/com/cse3310/App$LetterTimer.class index f712375..57ad105 100644 Binary files a/target/classes/com/cse3310/App$LetterTimer.class and b/target/classes/com/cse3310/App$LetterTimer.class differ diff --git a/target/classes/com/cse3310/App.class b/target/classes/com/cse3310/App.class index 8db69fc..8fb1bce 100644 Binary files a/target/classes/com/cse3310/App.class and b/target/classes/com/cse3310/App.class differ diff --git a/target/classes/com/cse3310/Game.class b/target/classes/com/cse3310/Game.class index 11bb1a6..8b49e5c 100644 Binary files a/target/classes/com/cse3310/Game.class and b/target/classes/com/cse3310/Game.class differ diff --git a/target/cse3310-wordsearch.jar b/target/cse3310-wordsearch.jar index b6a60c8..51eab02 100644 Binary files a/target/cse3310-wordsearch.jar and b/target/cse3310-wordsearch.jar differ diff --git a/target/surefire-reports/TEST-com.cse3310.AppTest.xml b/target/surefire-reports/TEST-com.cse3310.AppTest.xml index f473f6f..840c54f 100644 --- a/target/surefire-reports/TEST-com.cse3310.AppTest.xml +++ b/target/surefire-reports/TEST-com.cse3310.AppTest.xml @@ -1,5 +1,5 @@ - + @@ -15,7 +15,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -57,9 +57,9 @@ - + - - + + \ No newline at end of file diff --git a/target/surefire-reports/TEST-com.cse3310.UserTest.xml b/target/surefire-reports/TEST-com.cse3310.UserTest.xml index adc4694..663524a 100644 --- a/target/surefire-reports/TEST-com.cse3310.UserTest.xml +++ b/target/surefire-reports/TEST-com.cse3310.UserTest.xml @@ -15,7 +15,7 @@ - + @@ -31,7 +31,7 @@ - + diff --git a/target/surefire-reports/com.cse3310.AppTest.txt b/target/surefire-reports/com.cse3310.AppTest.txt index f4bef0a..0e13a8a 100644 --- a/target/surefire-reports/com.cse3310.AppTest.txt +++ b/target/surefire-reports/com.cse3310.AppTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: com.cse3310.AppTest ------------------------------------------------------------------------------- -Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.503 s - in com.cse3310.AppTest +Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.505 s - in com.cse3310.AppTest