checkGameOver(){
		let unknownOrBombCount = 0; // Amount of unknown/bomb sequares

		// Search the entire board
		for (let row = 0; row < this.boardSize; row++){
			for (let col = 0; col < this.boardSize; col++){
				let square = document.getElementById(row.toString() + "," + col.toString());
				// Counts the number of unknown and flagged squares
				if (square.classList.contains("unknownsquare") || square.classList.contains("flagsquare")){
					unknownOrBombCount++;
				}
			}
		}
		// If number of unknowns = number of bombs then user has won
		if (unknownOrBombCount == this.numBombs){
			this.endGame(true);
		}
	}
/*
     * Name: checkGameOver
     * Description: Checks if the game is over and ends the game is required
     * Return: None
    */
checkGameOver
Description: Checks if the game is over and ends the game is required
Return: None
checkGameOver Description : Checks if the game is over and ends the game is required Return : None
checkGameOver(){
		let unknownOrBombCount = 0; 
		for (let row = 0; row < this.boardSize; row++){
			for (let col = 0; col < this.boardSize; col++){
				let square = document.getElementById(row.toString() + "," + col.toString());
				if (square.classList.contains("unknownsquare") || square.classList.contains("flagsquare")){
					unknownOrBombCount++;
				}
			}
		}
		if (unknownOrBombCount == this.numBombs){
			this.endGame(true);
		}
	}
checkGameOver ( ) { let unknownOrBombCount = 0 ; for ( let row = 0 ; row < this . boardSize ; row ++ ) { for ( let col = 0 ; col < this . boardSize ; col ++ ) { let square = document . getElementById ( row . toString ( ) + "," + col . toString ( ) ) ; if ( square . classList . contains ( "unknownsquare" ) || square . classList . contains ( "flagsquare" ) ) { unknownOrBombCount ++ ; } } } if ( unknownOrBombCount == this . numBombs ) { this . endGame ( true ) ; } }
Name: checkGameOver
 Description: Checks if the game is over and ends the game is required
 Return: None
Name : checkGameOver Description : Checks if the game is over and ends the game is required Return : None
// Amount of unknown/bomb sequares // Search the entire board // Counts the number of unknown and flagged squares // If number of unknowns = number of bombs then user has won