X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=62611393b0b961dccf434ddd6a7e9ffe7809794b;hb=ff0150d1eb0ce3778310e67bb4ce87d0666a37d7;hp=1753df0d12eaf864d58ef856f01b54a377b9a2ac;hpb=4f524197ee499b58f574908c58bf50efa69dd359;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 1753df0d..62611393 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -753,6 +753,8 @@ export default { // Got opponent infos about last move this.gotLastate = true; this.lastate = data.data; + if (this.lastate.movesCount > this.gotMoveIdx) + this.gotMoveIdx = this.lastate.movesCount; if (this.game.rendered) // Game is rendered (Board component) this.processLastate(); @@ -760,6 +762,12 @@ export default { break; } case "newmove": { + +// DEBUG: +console.log("Receive move"); +console.log(data.data); +//moveslist not updated when receiving a move? (see in baseGame) + const movePlus = data.data; const movesCount = this.game.moves.length; if (movePlus.index > movesCount) { @@ -1054,7 +1062,7 @@ export default { let gameInfo = { id: getRandString(), //ignored if corr fen: V.GenRandInitFen(this.game.randomness), - players: this.game.players.reverse(), + players: [this.game.players[1], this.game.players[0]], vid: this.game.vid, cadence: this.game.cadence };