X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=7aa7aa5f4c0d46d45376717d921faf2278593ca1;hp=920e9c8453e203973beedb2ad89f405ff2df0785;hb=6ec161b904b068b0f07defce45dba936933f4a1b;hpb=9d54ab8900b69876c3249b4ed1bfa355dccb7f97 diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 920e9c84..7aa7aa5f 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -97,19 +97,8 @@ export default { // TODO: observer on dark games must see all board ? Or alternate ? (seems better) // ...or just see nothing as on buho21 this.$refs["basegame"].play( - data.move, this.game.vname!="Dark" ? "animate" : null); + data.move, this.game.vname!="Dark" ? "animate" : null); //TODO: arg to know if opponent move (or comp) in case of dark variant... this.processMove(data.move); - - - -// TODO: -// send filtered_move + elapsed time -// receive same. (update clock) + update (our) initime if it's my turn -// + update fen (using vr.getFen()) - - - - break; case "pong": //received if we sent a ping (game still alive on our side) if (this.gameRef.id != data.gameId) @@ -278,9 +267,9 @@ export default { // } }, // TODO: refactor this old "oppConnected" logic - oppConnected: function(uid) { - return this.opponents.some(o => o.id == uid && o.online); - }, +// oppConnected: function(uid) { +// return this.opponents.some(o => o.id == uid && o.online); +// }, // Post-process a move (which was just played) processMove: function(move) { if (!this.game.mycolor) @@ -316,7 +305,7 @@ export default { fen: move.fen, elapsed: move.elapsed, increment: this.game.increment, //redundant but faster - initime: (this.vr.turn == this.game.mycolor), //it's my turn + initime: (this.vr.turn == this.game.mycolor), //is it my turn? }); }, // NOTE: this update function should also work for corr games