From b3e005c81c48707d4a3097253a4c48bc3b4d0a2f Mon Sep 17 00:00:00 2001 From: muktar1907 Date: Mon, 29 Apr 2024 22:53:55 -0500 Subject: [PATCH] edit --- html/index_1.html | 4 ++-- src/main/java/uta/cse3310/Game.java | 5 ++++- src/test/java/uta/cse3310/gameTest.java | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/html/index_1.html b/html/index_1.html index a1cb805..a78e070 100644 --- a/html/index_1.html +++ b/html/index_1.html @@ -161,9 +161,9 @@

Leaderboard

let playerData; console.log(nick+"has joined"); - console.log(messageData.ready==="true"); + // console.log(messageData.ready==="true"); - if("ready" in messageData && messageData.ready==="true") + if("ready" in messageData && messageData.ready==="true" && messageData.gameId==gameId) { console.log(messageData.gameId); //access grid when gameStart is called diff --git a/src/main/java/uta/cse3310/Game.java b/src/main/java/uta/cse3310/Game.java index 0820452..12ef91a 100644 --- a/src/main/java/uta/cse3310/Game.java +++ b/src/main/java/uta/cse3310/Game.java @@ -159,7 +159,10 @@ public boolean wordChosen(String selectedWord, Player player) { } return true; } - else{return false;} + else + { + return false; + } } diff --git a/src/test/java/uta/cse3310/gameTest.java b/src/test/java/uta/cse3310/gameTest.java index a0d2aaa..25db4d7 100644 --- a/src/test/java/uta/cse3310/gameTest.java +++ b/src/test/java/uta/cse3310/gameTest.java @@ -171,6 +171,7 @@ public void testUpdate() System.out.println(wordList.get(i)); } System.out.println(wordList.size()); + System.out.println(var); assertTrue(wordList.size()==5); }