X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=e3a2f6e0dd9c212ec0f417c68a8a622c945924ef;hp=803751eb519a31ea00db94cbc092688768bc0825;hb=7e1a1fe92b6f8bdf556ba9a462b1ea8a794d5757;hpb=d9b86b16e70ba5acbeb09cf553e45e675667e1b1 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 { }, }; + +