projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix enter/exit analyze mode when in promotion or showing marks on boards
[vchess.git]
/
client
/
src
/
components
/
ComputerGame.vue
diff --git
a/client/src/components/ComputerGame.vue
b/client/src/components/ComputerGame.vue
index
44bfb6a
..
ad56543
100644
(file)
--- a/
client/src/components/ComputerGame.vue
+++ b/
client/src/components/ComputerGame.vue
@@
-43,8
+43,8
@@
export default {
let self = this;
setTimeout(() => {
if (this.currentUrl != document.location.href) return; //page change
let self = this;
setTimeout(() => {
if (this.currentUrl != document.location.href) return; //page change
- // NOTE: BaseGame::play() will trigger processMove() here
self.$refs["basegame"].play(compMove, "received");
self.$refs["basegame"].play(compMove, "received");
+ self.processMove(compMove);
self.compThink = false;
if (self.game.score != "*")
// User action
self.compThink = false;
if (self.game.score != "*")
// User action
@@
-89,6
+89,7
@@
export default {
processMove: function(move, scoreObj) {
playMove(move, this.vr);
// This move could have ended the game:
processMove: function(move, scoreObj) {
playMove(move, this.vr);
// This move could have ended the game:
+ if (!scoreObj) scoreObj = { score: this.vr.getCurrentScore() };
if (scoreObj.score != "*") {
this.gameOver(scoreObj.score);
return;
if (scoreObj.score != "*") {
this.gameOver(scoreObj.score);
return;