- // This move could have ended the game: if this is the case,
- // the game is already removed from storage (if mode == 'versus')
- if (this.game.score != "*") return;
+ // This move could have ended the game:
+ if (!scoreObj) scoreObj = { score: this.vr.getCurrentScore() };
+ if (scoreObj.score != "*") {
+ this.gameOver(scoreObj.score);
+ return;
+ }
+ if (this.game.score != "*")
+ // The game already ended, probably because of a user action
+ return;