From: Benjamin Auder Date: Fri, 19 Jul 2019 09:48:46 +0000 (+0200) Subject: 'update' X-Git-Url: https://git.auder.net/doc/html/pieces/img/vendor/DESCRIPTION?a=commitdiff_plain;h=7e1a1fe92b6f8bdf556ba9a462b1ea8a794d5757;p=vchess.git 'update' --- diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 803751eb..e3a2f6e0 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -191,6 +191,10 @@ export default { case "drawoffer": this.drawOffer = "received"; break; + case "askfullgame": + // TODO: just give game; observers are listed here anyway: + // gameconnect? + break; // TODO: drawaccepted (click draw button before sending move ==> draw offer in move) // ==> on "newmove", check "drawOffer" field // TODO: also use (dis)connect info to count online players? @@ -304,6 +308,7 @@ export default { return afterRetrival(game); if (!!this.gameRef.rid) { + this.st.conn.send(JSON.stringify({code:"askfullgame", target:this.gameRef.rid})); // TODO: just send a game request message to the remote player, // and when receiving answer just call loadGame(received_game) // + remote peer should have registered us as an observer @@ -373,3 +378,7 @@ export default { }, }; + +