diff --git a/src/main/java/com/cse3310/App.java b/src/main/java/com/cse3310/App.java
index 0944d9d..232b677 100644
--- a/src/main/java/com/cse3310/App.java
+++ b/src/main/java/com/cse3310/App.java
@@ -74,7 +74,7 @@ public void onClose(WebSocket conn, int code, String reason, boolean remote) {
// Fill list with player data from the game (EXCEPT THE USER THAT IS ABOUT TO
// LEAVE)
for (User user : ActiveUsers) {
- if ((gameid == user.GameId) && (thisUser.username != user.username) && (user.GameId != -1)) {
+ if (gameid == user.GameId && thisUser.username != user.username) {
list.players.add(user.username);
list.playerScores.add(user.wordCount);
}
@@ -83,7 +83,7 @@ public void onClose(WebSocket conn, int code, String reason, boolean remote) {
// Send completed game list to all users in the specific game
int usersIngame = 0;
for (User user : ActiveUsers) {
- if ((gameid == user.GameId) && (thisUser.username != user.username) && (user.GameId != -1)) {
+ if (gameid == user.GameId && thisUser.username != user.username) {
usersIngame++;
String jsonString = gson.toJson(list);
user.conn.send(jsonString);
@@ -95,7 +95,6 @@ public void onClose(WebSocket conn, int code, String reason, boolean remote) {
for (int j = 0; j < LobbyUsers.size(); j++) {
if (LobbyUsers.get(j).user.equals(tempName)) {
- System.out.println("REMOVING: " + LobbyUsers.get(j).user + " FROM LOBBY");
if (LobbyUsers.get(j).ready == true) {
numReady--;
}
@@ -107,7 +106,7 @@ public void onClose(WebSocket conn, int code, String reason, boolean remote) {
ActiveUsers.remove(ActiveUsers.indexOf(thisUser));
}
- if ((usersIngame < 2) && (list.players.size() != 0)) {
+ if (usersIngame < 2) {
forceDisconnect(gameid);
for (User u : ActiveUsers) {
if (u.GameId == gameid) {
@@ -120,8 +119,7 @@ public void onClose(WebSocket conn, int code, String reason, boolean remote) {
}
}
if (LobbyUsers != null) {
- ServerEvent sendBack = new ServerEvent(1, LobbyUsers);
- String jsonString = gson.toJson(sendBack);
+ String jsonString = gson.toJson(LobbyUsers);
broadcast(jsonString);
}
diff --git a/target/classes/com/cse3310/App$LetterTimer.class b/target/classes/com/cse3310/App$LetterTimer.class
new file mode 100644
index 0000000..4c15f76
Binary files /dev/null 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
new file mode 100644
index 0000000..477ca5f
Binary files /dev/null and b/target/classes/com/cse3310/App.class differ
diff --git a/target/classes/com/cse3310/Error.class b/target/classes/com/cse3310/Error.class
new file mode 100644
index 0000000..34e9410
Binary files /dev/null and b/target/classes/com/cse3310/Error.class differ
diff --git a/target/classes/com/cse3310/Game.class b/target/classes/com/cse3310/Game.class
new file mode 100644
index 0000000..82cc574
Binary files /dev/null and b/target/classes/com/cse3310/Game.class differ
diff --git a/target/classes/com/cse3310/HttpServer$1.class b/target/classes/com/cse3310/HttpServer$1.class
new file mode 100644
index 0000000..07d087b
Binary files /dev/null and b/target/classes/com/cse3310/HttpServer$1.class differ
diff --git a/target/classes/com/cse3310/HttpServer.class b/target/classes/com/cse3310/HttpServer.class
new file mode 100644
index 0000000..5489531
Binary files /dev/null and b/target/classes/com/cse3310/HttpServer.class differ
diff --git a/target/classes/com/cse3310/Lobby.class b/target/classes/com/cse3310/Lobby.class
new file mode 100644
index 0000000..66c6665
Binary files /dev/null and b/target/classes/com/cse3310/Lobby.class differ
diff --git a/target/classes/com/cse3310/PlayerList.class b/target/classes/com/cse3310/PlayerList.class
new file mode 100644
index 0000000..a6a8b42
Binary files /dev/null and b/target/classes/com/cse3310/PlayerList.class differ
diff --git a/target/classes/com/cse3310/ServerEvent.class b/target/classes/com/cse3310/ServerEvent.class
new file mode 100644
index 0000000..ac68da9
Binary files /dev/null and b/target/classes/com/cse3310/ServerEvent.class differ
diff --git a/target/classes/com/cse3310/User.class b/target/classes/com/cse3310/User.class
new file mode 100644
index 0000000..d4185c8
Binary files /dev/null and b/target/classes/com/cse3310/User.class differ
diff --git a/target/classes/com/cse3310/UserEvent.class b/target/classes/com/cse3310/UserEvent.class
new file mode 100644
index 0000000..113f2ee
Binary files /dev/null and b/target/classes/com/cse3310/UserEvent.class differ
diff --git a/target/classes/com/cse3310/Version.class b/target/classes/com/cse3310/Version.class
new file mode 100644
index 0000000..320775b
Binary files /dev/null and b/target/classes/com/cse3310/Version.class differ
diff --git a/target/classes/com/cse3310/Winner.class b/target/classes/com/cse3310/Winner.class
new file mode 100644
index 0000000..b0d81be
Binary files /dev/null and b/target/classes/com/cse3310/Winner.class differ
diff --git a/target/classes/com/cse3310/timerEvent.class b/target/classes/com/cse3310/timerEvent.class
new file mode 100644
index 0000000..997a287
Binary files /dev/null and b/target/classes/com/cse3310/timerEvent.class differ
diff --git a/target/cse3310-wordsearch.jar b/target/cse3310-wordsearch.jar
new file mode 100644
index 0000000..c6397c8
Binary files /dev/null and b/target/cse3310-wordsearch.jar differ
diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties
new file mode 100644
index 0000000..d873df1
--- /dev/null
+++ b/target/maven-archiver/pom.properties
@@ -0,0 +1,4 @@
+#Created by Apache Maven 3.6.3
+groupId=com.cse3310_sp24_group26
+artifactId=cse3310
+version=wordsearch
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
new file mode 100644
index 0000000..146f641
--- /dev/null
+++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
@@ -0,0 +1,14 @@
+com/cse3310/HttpServer.class
+com/cse3310/Version.class
+com/cse3310/Lobby.class
+com/cse3310/timerEvent.class
+com/cse3310/App$LetterTimer.class
+com/cse3310/Game.class
+com/cse3310/Winner.class
+com/cse3310/Error.class
+com/cse3310/ServerEvent.class
+com/cse3310/HttpServer$1.class
+com/cse3310/UserEvent.class
+com/cse3310/User.class
+com/cse3310/App.class
+com/cse3310/PlayerList.class
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
new file mode 100644
index 0000000..7e3e56f
--- /dev/null
+++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -0,0 +1,12 @@
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/ServerEvent.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Winner.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/User.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/PlayerList.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Version.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/App.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/UserEvent.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Error.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/HttpServer.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Game.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Lobby.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/timerEvent.java
diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
new file mode 100644
index 0000000..9c1d4bd
--- /dev/null
+++ b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
@@ -0,0 +1,2 @@
+com/cse3310/UserTest.class
+com/cse3310/AppTest.class
diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
new file mode 100644
index 0000000..a8cfddd
--- /dev/null
+++ b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
@@ -0,0 +1,2 @@
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/test/java/com/cse3310/UserTest.java
+/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/test/java/com/cse3310/AppTest.java
diff --git a/target/surefire-reports/TEST-com.cse3310.AppTest.xml b/target/surefire-reports/TEST-com.cse3310.AppTest.xml
new file mode 100644
index 0000000..361a424
--- /dev/null
+++ b/target/surefire-reports/TEST-com.cse3310.AppTest.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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
new file mode 100644
index 0000000..337ce0d
--- /dev/null
+++ b/target/surefire-reports/TEST-com.cse3310.UserTest.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/surefire-reports/com.cse3310.AppTest.txt b/target/surefire-reports/com.cse3310.AppTest.txt
new file mode 100644
index 0000000..1b0916c
--- /dev/null
+++ b/target/surefire-reports/com.cse3310.AppTest.txt
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------------------
+Test set: com.cse3310.AppTest
+-------------------------------------------------------------------------------
+Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.547 s - in com.cse3310.AppTest
diff --git a/target/surefire-reports/com.cse3310.UserTest.txt b/target/surefire-reports/com.cse3310.UserTest.txt
new file mode 100644
index 0000000..5b9d0cd
--- /dev/null
+++ b/target/surefire-reports/com.cse3310.UserTest.txt
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------------------
+Test set: com.cse3310.UserTest
+-------------------------------------------------------------------------------
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in com.cse3310.UserTest
diff --git a/target/test-classes/com/cse3310/AppTest.class b/target/test-classes/com/cse3310/AppTest.class
new file mode 100644
index 0000000..8739919
Binary files /dev/null and b/target/test-classes/com/cse3310/AppTest.class differ
diff --git a/target/test-classes/com/cse3310/UserTest.class b/target/test-classes/com/cse3310/UserTest.class
new file mode 100644
index 0000000..c2f8c6c
Binary files /dev/null and b/target/test-classes/com/cse3310/UserTest.class differ