X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fgame.js;h=6627252fd6d3c8e54fd068b879c92a0aef403a2d;hp=94340e6605ce77c363d16cd0c7323c661d4494cc;hb=5915f72002ae63b04620cebe47adf778174b1bee;hpb=dbcc32e95d526fe518ac866f7b3cdac546f1178e diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 94340e66..6627252f 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -62,9 +62,8 @@ Vue.component('my-game', { }, [h('i', { 'class': { "material-icons": true } }, "accessibility")]) ); - if (variant != "Dark" && - (["idle","computer","friend"].includes(this.mode) - || ["friend","human"].includes(this.mode) && this.score != "*")) + if (["idle","computer","friend"].includes(this.mode) + || (this.mode == "human" && this.score != "*")) { actionArray.push( h('button', @@ -81,9 +80,8 @@ Vue.component('my-game', { [h('i', { 'class': { "material-icons": true } }, "computer")]) ); } - if (variant != "Dark" && - (["idle","friend"].includes(this.mode) - || ["computer","human"].includes(this.mode) && this.score != "*")) + if (variant != "Dark" && (["idle","friend"].includes(this.mode) + || (["computer","human"].includes(this.mode) && this.score != "*"))) { actionArray.push( h('button', @@ -1130,12 +1128,13 @@ Vue.component('my-game', { // before they appear on page: const delay = Math.max(500-(Date.now()-self.timeStart), 0); setTimeout(() => { + const animate = (variant!="Dark" ? "animate" : null); if (self.mode == "computer") //warning: mode could have changed! - self.play(compMove[0], "animate"); + self.play(compMove[0], animate); if (compMove.length == 2) setTimeout( () => { if (self.mode == "computer") - self.play(compMove[1], "animate"); + self.play(compMove[1], animate); }, 750); }, delay); }