X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=fdbd2c3c2d2c1b91783dbd3cedcc5d4bd30e0265;hb=a06fc4ba49b535ba45d70ee7401c5d2e26faefa2;hp=df2e8af5944f915486f2d899e67fe0322bbc2e0f;hpb=0f0552a7e966246b9c81dda5e1ca2cb1fddd8961;p=vchess.git diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index df2e8af5..fdbd2c3c 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -275,6 +275,8 @@ export default { } this.vr = new V(fen); this.incheck = this.vr.getCheckSquares(); + if (this.cursor >= 0) this.lastMove = this.moves[this.cursor]; + else this.lastMove = null; document.getElementById("analyzeBtn").classList.remove("active"); } }, @@ -430,10 +432,6 @@ 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: @@ -527,9 +525,6 @@ export default { }; const afterMove = (smove, initurn) => { if (this.vr.turn != initurn) { - -console.log(smove); - // Turn has changed: move is complete if (!smove.fen) // NOTE: only FEN of last sub-move is required (=> setting it here) @@ -665,6 +660,7 @@ console.log(smove);