X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=228d9c4be4ab17923a40080d974d09470c23a7d9;hb=130cca8b28bbba4fe586f4ddad22808d2aa9a537;hp=dc15413f7c3eeef167c0c948afe3628a078f1a91;hpb=49dc04f91386f8af97994b9f8734a0cde9b3d4b0;p=vchess.git diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index dc15413f..228d9c4b 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -274,6 +274,7 @@ export default { fen = mv[mv.length-1].fen; } this.vr = new V(fen); + this.incheck = this.vr.getCheckSquares(); document.getElementById("analyzeBtn").classList.remove("active"); } }, @@ -429,6 +430,10 @@ export default { return; } if (!!received) { + + if (this.mode == "analyze") { console.log("received move"); + console.log(move); } + if (this.mode == "analyze") this.toggleAnalyze(); if (this.cursor < this.moves.length - 1) // To play a received move, cursor must be at the end of the game: @@ -491,6 +496,9 @@ export default { if (animate && smove.start.x >= 0) { self.animateMove(smove, () => { playSubmove(smove); + +console.log(moveIdx + " " + move.length); + if (moveIdx < move.length) setTimeout(executeMove, 500); else afterMove(smove, initurn);