diff --git a/html/index.html b/html/index.html index 53a35a5..883840f 100644 --- a/html/index.html +++ b/html/index.html @@ -45,8 +45,13 @@

The Word Search Game

-
+ + +
+

Timer: 30 seconds

+
+
@@ -58,16 +63,44 @@

The Word Search Game

diff --git a/html/style_lobby.css b/html/style_lobby.css index 368aaed..8510c96 100644 --- a/html/style_lobby.css +++ b/html/style_lobby.css @@ -106,3 +106,20 @@ select { -webkit-appearance: none; -moz-appearance: none; } + +/* Add styles for the timer section */ +#timerSection { + margin-top: 20px; /* Adjust the margin as needed */ + padding: 10px; /* Add padding for space around the timer */ + border: 2px solid #ccc; /* Add a border around the timer section */ + border-radius: 5px; /* Add rounded corners to the border */ + text-align: center; /* Center the timer text */ +} + +/* Add styles for the timer text */ +#timer { + font-size: 24px; /* Change the font size of the timer text */ + color: #333; /* Change the color of the timer text */ + font-weight: bold; /* Make the timer text bold */ +} + diff --git a/src/main/java/uta/cse3310/App.java b/src/main/java/uta/cse3310/App.java index 610c812..96e9e18 100644 --- a/src/main/java/uta/cse3310/App.java +++ b/src/main/java/uta/cse3310/App.java @@ -375,7 +375,10 @@ public void messageHandler(Gson gson, String jsonString, WebSocket conn) json=gson.toJson(G); //add game to json Object to send back jsonObject.addProperty("game",json); + + jsonObject.addProperty("gameId",G.getGameID()); //send back to all connections + broadcast(jsonObject.toString()); break;