+ watch: {
+ // fenStart changes when a new game starts
+ fenStart: function() {
+ // Reset all variables
+ this.endgameMessage = "";
+ this.orientation = this.mycolor;
+ this.score = "*";
+ this.moves = [];
+ this.cursor = -1;
+ this.lastMove = null;
+ },
+ analyze: function() {
+ if (this.analyze)
+ {
+ // Switched to analyze mode: game is over
+ this.endGame("*");
+ }
+ },
+ },