- // NOTE: do not animate move if special display (ShowMoves != "all")
- const animate = V.ShowMoves == "all";
- const animDelay = animate ? 250 : 0;
- let moveIdx = 0;
- let self = this;
- (function executeMove() {
- // NOTE: BaseGame::play() will trigger processMove() here
- self.$refs["basegame"].play(compMove[moveIdx++], "received");
- if (moveIdx >= compMove.length) {
- self.compThink = false;
- if (self.game.score != "*")
- // User action
- self.$emit("game-stopped");
- } else setTimeout(executeMove, 500 + animDelay);
- })();
+ // NOTE: BaseGame::play() will trigger processMove() here
+ self.$refs["basegame"].play(compMove, "received");
+ self.compThink = false;
+ if (self.game.score != "*")
+ // User action
+ self.$emit("game-stopped");