countBombsNear(squareRow, squareCol){
		let bombsNear = 0;

		// Search the 3x3 grid
		for (let row = Math.max(squareRow - 1, 0); row < Math.min(squareRow + 2, this.boardSize); row++){
			for (let col = Math.max(squareCol - 1, 0); col < Math.min(squareCol + 2, this.boardSize); col++){
				// Save searching useless spot
				if (row == squareRow && col == squareCol){ continue; }
				// checks all the bomb locations to see if the square is a bomb
				if (inArray(this.bombLocations, row.toString() + "," + col.toString())){
					bombsNear += 1;
				}
			}
		}
		return bombsNear;
	}
/*
     * Name: countBombsNear
     * Description: Counts the bombs in a 3x3 grid aruound a square
     * Return: The number of bombs nearby
    */
countBombsNear
Description: Counts the bombs in a 3x3 grid aruound a square
Return: The number of bombs nearby
countBombsNear Description : Counts the bombs in a 3x3 grid aruound a square Return : The number of bombs nearby
countBombsNear(squareRow, squareCol){
		let bombsNear = 0;
		for (let row = Math.max(squareRow - 1, 0); row < Math.min(squareRow + 2, this.boardSize); row++){
			for (let col = Math.max(squareCol - 1, 0); col < Math.min(squareCol + 2, this.boardSize); col++){
				if (row == squareRow && col == squareCol){ continue; }
				if (inArray(this.bombLocations, row.toString() + "," + col.toString())){
					bombsNear += 1;
				}
			}
		}
		return bombsNear;
	}
countBombsNear ( squareRow , squareCol ) { let bombsNear = 0 ; for ( let row = Math . max ( squareRow - 1 , 0 ) ; row < Math . min ( squareRow + 2 , this . boardSize ) ; row ++ ) { for ( let col = Math . max ( squareCol - 1 , 0 ) ; col < Math . min ( squareCol + 2 , this . boardSize ) ; col ++ ) { if ( row == squareRow && col == squareCol ) { continue ; } if ( inArray ( this . bombLocations , row . toString ( ) + "," + col . toString ( ) ) ) { bombsNear += 1 ; } } } return bombsNear ; }
Name: countBombsNear
 Description: Counts the bombs in a 3x3 grid aruound a square
 Return: The number of bombs nearby
Name : countBombsNear Description : Counts the bombs in a 3x3 grid aruound a square Return : The number of bombs nearby
// Search the 3x3 grid // Save searching useless spot // checks all the bomb locations to see if the square is a bomb