diff --git a/html/main.js b/html/main.js index 94239e1..b099435 100644 --- a/html/main.js +++ b/html/main.js @@ -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; @@ -70,12 +70,6 @@ connection.onmessage = function(event){ case 'matrixCreated': generateGrid(data); - if (timer_shown === false) - { - startGameTimer(); - timer_shown = true; - } - showGame(); break; @@ -600,9 +594,9 @@ function startGameTimer() { startTimer(twentyMinutes, display); } -/*window.onload = function() { +window.onload = function() { startGameTimer(); // Start the game timer when the window loads -};*/ +};