broadfield-dev commited on
Commit
b28a497
·
verified ·
1 Parent(s): 8db44f2

Update static/scripts.js

Browse files
Files changed (1) hide show
  1. 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...');