src/Maze.js
// If algorithm has already been run, you can't interact with the board again

If algorithm has already been run, you can't interact with the board again
If algorithm has already been run you can ' t interact with the board again
addWall(event) {
		if (!this.state.ranAlgorithm) {
			let addingWall;
			if (document.getElementById(event.target.id).className.includes("wall-fill")) {
				document.getElementById(event.target.id).className = "columns regular board-padding";
				addingWall = false;
			}
			else {
				document.getElementById(event.target.id).className += " wall-fill";
				addingWall = true;
			}
			let gridIndices = event.target.id.split("_");
			let moreWalls = this.state.walls;
			let newWall = gridIndices[0].toString() + "_" + gridIndices[1].toString();
			if (addingWall) {
				moreWalls.add(newWall);
			}
			else {
				moreWalls.delete(newWall);
			}
			this.setState({walls: moreWalls});
		}
	}
addWall ( event ) { if ( ! this . state . ranAlgorithm ) { let addingWall ; if ( document . getElementById ( event . target . id ) . className . includes ( "wall-fill" ) ) { document . getElementById ( event . target . id ) . className = "columns regular board-padding" ; addingWall = false ; } else { document . getElementById ( event . target . id ) . className += " wall-fill" ; addingWall = true ; } let gridIndices = event . target . id . split ( "_" ) ; let moreWalls = this . state . walls ; let newWall = gridIndices [ 0 ] . toString ( ) + "_" + gridIndices [ 1 ] . toString ( ) ; if ( addingWall ) { moreWalls . add ( newWall ) ; } else { moreWalls . delete ( newWall ) ; } this . setState ( { walls : moreWalls } ) ; } }
If algorithm has already been run, you can't interact with the board again
If algorithm has already been run you can ' t interact with the board again
// Show that the user clicked on a wall
 // ID of each grid box is in the form "row_column"
 // Update the maze so that a box has become a wall
 // Add wall to the set
 // Remove wall from the set
 // Update Set of walls
