endGame(win=false){
		this.gameOver = true;

		// Simulate a click on each square to show the user the complete board
		for (let i = 0; i < this.boardSize; i++){
			for (let j = 0; j < this.boardSize; j++){
				this.clickSquare(document.getElementById(i.toString() + "," + j.toString()));
			}
		}

		// End the timer loop
		clearTimeout();

		// Win or lose. Update the database if win
		if (win){
			// Calculate the results of the game and 
			let duration = Math.round(new Date().getTime() / 1000) - this.startedTime;
			this.vuePage.time = duration;
			accessHighscores.updateHighscores(minesweeperHighScore(duration, this.boardSize, this.numBombs), prompt("Enter a name:"), "minesweeper")
		}else{
			alert("You lose! Press Reset to reset!");
		}
	}
/*
     * Name: endGame
     * Description: Ends the game
     * Return: None
    */
endGame
Description: Ends the game
Return: None
endGame Description : Ends the game Return : None
endGame(win=false){
		this.gameOver = true;
		for (let i = 0; i < this.boardSize; i++){
			for (let j = 0; j < this.boardSize; j++){
				this.clickSquare(document.getElementById(i.toString() + "," + j.toString()));
			}
		}
		clearTimeout();
		if (win){
			let duration = Math.round(new Date().getTime() / 1000) - this.startedTime;
			this.vuePage.time = duration;
			accessHighscores.updateHighscores(minesweeperHighScore(duration, this.boardSize, this.numBombs), prompt("Enter a name:"), "minesweeper")
		}else{
			alert("You lose! Press Reset to reset!");
		}
	}
endGame ( win = false ) { this . gameOver = true ; for ( let i = 0 ; i < this . boardSize ; i ++ ) { for ( let j = 0 ; j < this . boardSize ; j ++ ) { this . clickSquare ( document . getElementById ( i . toString ( ) + "," + j . toString ( ) ) ) ; } } clearTimeout ( ) ; if ( win ) { let duration = Math . round ( new Date ( ) . getTime ( ) / 1000 ) - this . startedTime ; this . vuePage . time = duration ; accessHighscores . updateHighscores ( minesweeperHighScore ( duration , this . boardSize , this . numBombs ) , prompt ( "Enter a name:" ) , "minesweeper" ) } else { alert ( "You lose! Press Reset to reset!" ) ; } }
Name: endGame
 Description: Ends the game
 Return: None
Name : endGame Description : Ends the game Return : None
// Simulate a click on each square to show the user the complete board // End the timer loop // Win or lose. Update the database if win // Calculate the results of the game and 