+ case "askgame":
+ // Send current (live) game
+ const myGame =
+ {
+ // Minimal game informations:
+ id: this.game.id,
+ players: this.game.players.map(p => { return {name:p.name}; }),
+ vid: this.game.vid,
+ timeControl: this.game.timeControl,
+ };
+ this.st.conn.send(JSON.stringify({code:"game",
+ game:myGame, target:data.from}));
+ break;