},
// 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);
localStorage["players"] = JSON.stringify(gameInfo.players);
if (this.st.settings.sound >= 1)
new Audio("/sounds/newgame.mp3").play().catch(err => {});
+ // TODO: redirect to game
},
},
};