X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FComputerGame.vue;h=78f6eb49269647d5dcbf8f2313b6ca2ea6937752;hp=46b672bbaf4687e65ae67f3b516c6c36693aaedf;hb=63ca2b89cfe577efd168c6b2e26750cb01b66d64;hpb=430a203855578f9bbf4c851165c6066a741ff1f8 diff --git a/client/src/components/ComputerGame.vue b/client/src/components/ComputerGame.vue index 46b672bb..78f6eb49 100644 --- a/client/src/components/ComputerGame.vue +++ b/client/src/components/ComputerGame.vue @@ -14,7 +14,7 @@ export default { BaseGame, }, // gameInfo: fen + mode + vname - // mode: "auto" (game comp vs comp), "versus" (normal) or "analyze" + // mode: "auto" (game comp vs comp) or "versus" (normal) props: ["gameInfo"], data: function() { return { @@ -35,7 +35,6 @@ export default { if (newScore != "*") { this.game.score = newScore; //user action - this.game.mode = "analyze"; if (!this.compThink) this.$emit("game-stopped"); //otherwise wait for comp } @@ -66,7 +65,7 @@ export default { let moveIdx = 0; let self = this; (function executeMove() { - self.$refs.basegame.play(compMove[moveIdx++], animate); + self.$set(self.game, "moveToPlay", compMove[moveIdx++]); if (moveIdx >= compMove.length) { self.compThink = false; @@ -126,7 +125,6 @@ export default { gameOver: function(score, scoreMsg) { this.game.score = score; this.game.scoreMsg = scoreMsg; - this.game.mode = "analyze"; this.$emit("game-over", score); //bubble up to Rules.vue }, },