fix issue
This commit is contained in:
		
							parent
							
								
									6dd0950bae
								
							
						
					
					
						commit
						d91c92370f
					
				
					 1 changed files with 13 additions and 1 deletions
				
			
		| 
						 | 
					@ -8,6 +8,18 @@ class Game {
 | 
				
			||||||
    this.points = 0;
 | 
					    this.points = 0;
 | 
				
			||||||
    this.totalMoves = 0;
 | 
					    this.totalMoves = 0;
 | 
				
			||||||
    this.levelMoves = {};
 | 
					    this.levelMoves = {};
 | 
				
			||||||
 | 
					    this.traditional = false;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  toggleTraditional() {
 | 
				
			||||||
 | 
					    if (this.traditional) {
 | 
				
			||||||
 | 
					      this.traditional = false;
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      this.traditional = true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    this.mapInstance.traditional = this.traditional;
 | 
				
			||||||
 | 
					    this.mapInstance.display();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  initializeLevel() {
 | 
					  initializeLevel() {
 | 
				
			||||||
| 
						 | 
					@ -50,7 +62,7 @@ class Map {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.totalWin = g.level + 1 == levels.length;
 | 
					    this.totalWin = g.level + 1 == levels.length;
 | 
				
			||||||
    this.finalPointsGiven = false;
 | 
					    this.finalPointsGiven = false;
 | 
				
			||||||
    this.traditional = false;
 | 
					    this.traditional = g.traditional;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  generateMapArray() {
 | 
					  generateMapArray() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue