TODO: game storage init + get
[vchess.git] / client / src / views / Hall.vue
index 0fd8322..9b891d7 100644 (file)
@@ -584,6 +584,8 @@ export default {
     },
     // NOTE: for live games only (corr games are launched on server)
     newGame: function(gameInfo) {
+      GameStorage.init(); //TODO here
+
       localStorage["gid"] = getRandString();
       // Extract times (in [milli]seconds), set clocks, store in localStorage
       const tc = extractTime(gameInfo.timeControl);
@@ -598,6 +600,7 @@ export default {
       localStorage["players"] = JSON.stringify(gameInfo.players);
       if (this.st.settings.sound >= 1)
         new Audio("/sounds/newgame.mp3").play().catch(err => {});
+      // TODO: redirect to game
     },
   },
 };