- 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 => {});
+ localStorage["timeControl"] = gameInfo.timeControl;
+ localStorage["clocks"] = JSON.stringify(
+ [...Array(gameInfo.players.length)].fill(tc.mainTime));
+ localStorage["increment"] = tc.increment;
+ localStorage["started"] = JSON.stringify(
+ [...Array(gameInfo.players.length)].fill(false));
+ localStorage["mysid"] = this.st.user.sid;
+ localStorage["vname"] = this.getVname(gameInfo.vid);
+ localStorage["fenInit"] = gameInfo.fen;
+ localStorage["players"] = JSON.stringify(gameInfo.players);
+ if (this.st.settings.sound >= 1)
+ new Audio("/sounds/newgame.mp3").play().catch(err => {});