addBombs(){
		let possibleLocations = [];

		// Add all locations as possible locations for a bomb
		for (let i = 0; i < this.boardSize; i++){
			for (let j = 0; j < this.boardSize; j++){
				possibleLocations.push(i.toString() + "," + j.toString());
			}
		}

		let bombs2place = this.numBombs; // remaining boms to place

		// Randomly select a location and see if its acceptable
		while(bombs2place > 0 && possibleLocations.length > 0){
			let locIndex = Math.floor(Math.random() * possibleLocations.length);
			let loc = possibleLocations[locIndex];
			// Remove loc from possibilities
			possibleLocations[locIndex] = possibleLocations[0];
			possibleLocations.shift();
			if (this.acceptableBombLoc(loc)){
				this.bombLocations.push(loc);
				bombs2place--;
			}
		}
		
		// Subtract the bombs that failed to place from the counter
		this.vuePage.bombs -= bombs2place; 
	}
/*
     * Name: addBombs
     * Description: Adds the bombs to the game
     * Return: None
    */
addBombs
Description: Adds the bombs to the game
Return: None
addBombs Description : Adds the bombs to the game Return : None
addBombs(){
		let possibleLocations = [];
		for (let i = 0; i < this.boardSize; i++){
			for (let j = 0; j < this.boardSize; j++){
				possibleLocations.push(i.toString() + "," + j.toString());
			}
		}
		let bombs2place = this.numBombs; 
		while(bombs2place > 0 && possibleLocations.length > 0){
			let locIndex = Math.floor(Math.random() * possibleLocations.length);
			let loc = possibleLocations[locIndex];
			possibleLocations[locIndex] = possibleLocations[0];
			possibleLocations.shift();
			if (this.acceptableBombLoc(loc)){
				this.bombLocations.push(loc);
				bombs2place--;
			}
		}
		this.vuePage.bombs -= bombs2place; 
	}
addBombs ( ) { let possibleLocations = [ ] ; for ( let i = 0 ; i < this . boardSize ; i ++ ) { for ( let j = 0 ; j < this . boardSize ; j ++ ) { possibleLocations . push ( i . toString ( ) + "," + j . toString ( ) ) ; } } let bombs2place = this . numBombs ; while ( bombs2place > 0 && possibleLocations . length > 0 ) { let locIndex = Math . floor ( Math . random ( ) * possibleLocations . length ) ; let loc = possibleLocations [ locIndex ] ; possibleLocations [ locIndex ] = possibleLocations [ 0 ] ; possibleLocations . shift ( ) ; if ( this . acceptableBombLoc ( loc ) ) { this . bombLocations . push ( loc ) ; bombs2place -- ; } } this . vuePage . bombs -= bombs2place ; }
Name: addBombs
 Description: Adds the bombs to the game
 Return: None
Name : addBombs Description : Adds the bombs to the game Return : None
// Add all locations as possible locations for a bomb // remaining boms to place // Randomly select a location and see if its acceptable // Remove loc from possibilities // Subtract the bombs that failed to place from the counter