Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ixk3065 committed May 1, 2024
1 parent a600ea1 commit 39c1b7a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions html/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var serverUrl = "ws://" + window.location.hostname + ":" + (parseInt(location.po
var connection = new WebSocket(serverUrl);
var currentPlayerName = null;
var wordList = [];
var timer_shown = false;

//format for json
function UserEvent(type, eventData){
this.type = type;
Expand Down Expand Up @@ -70,12 +70,6 @@ connection.onmessage = function(event){

case 'matrixCreated':
generateGrid(data);
if (timer_shown === false)
{
startGameTimer();
timer_shown = true;
}

showGame();
break;

Expand Down Expand Up @@ -600,9 +594,9 @@ function startGameTimer() {
startTimer(twentyMinutes, display);
}

/*window.onload = function() {
window.onload = function() {
startGameTimer(); // Start the game timer when the window loads
};*/
};



Expand Down

0 comments on commit 39c1b7a

Please sign in to comment.