- // Extract times (in [milli]seconds), set clocks, store in localStorage
- const tc = extractTime(gameInfo.timeControl);
- dddddddd
- // TODO: [in game] send move + elapsed time (in milliseconds); in case of "lastate" message too
- // //setStorage(game); //TODO
-// if (this.settings.sound >= 1)
-// new Audio("/sounds/newgame.mp3").play().catch(err => {});
+ GameStorage.init({
+ gameId: getRandString(),
+ vname: this.getVname(gameInfo.vid),
+ fenStart: gameInfo.fen,
+ players: gameInfo.players,
+ timeControl: gameInfo.timeControl,
+ });
+ if (this.st.settings.sound >= 1)
+ new Audio("/sounds/newgame.mp3").play().catch(err => {});
+ // TODO: redirect to game