Spaces:
Sleeping
Sleeping
Update static/scripts.js
Browse files- static/scripts.js +4 -0
static/scripts.js
CHANGED
@@ -42,6 +42,10 @@ for (let key in images) {
|
|
42 |
}
|
43 |
|
44 |
socket.on('update_game', (state) => {
|
|
|
|
|
|
|
|
|
45 |
window.currentState = state;
|
46 |
if (allImagesLoaded) drawGame(state);
|
47 |
else console.log('Waiting for images to load...');
|
|
|
42 |
}
|
43 |
|
44 |
socket.on('update_game', (state) => {
|
45 |
+
console.log('Received game state:', state);
|
46 |
+
window.currentState = state;
|
47 |
+
if (allImagesLoaded) drawGame(state);
|
48 |
+
else console.log('Waiting for images to load...');
|
49 |
window.currentState = state;
|
50 |
if (allImagesLoaded) drawGame(state);
|
51 |
else console.log('Waiting for images to load...');
|