Skip to content

Commit

Permalink
corrected messages to better reflect activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Fierro committed Apr 24, 2024
1 parent a58e303 commit 9aa9b71
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<label for="username">Username:</label>
<input type="text" id="username" maxlength="20">
<button id="joinButton">Join Game</button>
<div id="lobby-status">Waiting for players...</div>
<div id="lobby-status">Not in lobby yet</div>
<div id="players-in-lobby">Players in Lobby:</div>
<button id="ready-button">Ready Up</button> <!-- Ready Up button -->
<label id="topMessage"></label>
Expand Down Expand Up @@ -285,7 +285,10 @@ <h3>Leaderboard</h3>
username: username
};
connection.send(JSON.stringify(joinRequest));
document.getElementById("lobby-status").innerHTML = "Trying to join the game...";
var lobbyStatus = document.getElementById("lobby-status").innerHTML;
if (lobbyStatus === "Not in lobby yet") {
document.getElementById("lobby-status").innerHTML = "Joined Lobby!";
}
} else {
alert("Please enter a username.");
}
Expand Down Expand Up @@ -329,4 +332,4 @@ <h3>Leaderboard</h3>
};
</script>
</body>
</html>
</html>

0 comments on commit 9aa9b71

Please sign in to comment.