src/Maze.js
/* 
		Find the next possible moves given a certain position.

			- rows: Integer value of rows in the maze
			- columns: Integer value of columns in the maze
			- currentPosition: Current position as an object with properties (row, column)
	*/
Find the next possible moves given a certain position.
rows: Integer value of rows in the maze
columns: Integer value of columns in the maze
currentPosition: Current position as an object with properties (row, column)
Find the next possible moves given a certain position . rows : Integer value of rows in the maze columns : Integer value of columns in the maze currentPosition : Current position as an object with properties ( row column )
findChildrenMoves(rows, columns, currentPosition) {
		let childrenPositions = [];
		if (currentPosition.row-1 >= 0) {
			let children = {
				row: currentPosition.row-1,
				column: currentPosition.column,
				direction: "up"
			}
			childrenPositions.push(children);
		}
		if (currentPosition.column+1 <= columns-1) {
			let children = {
				row: currentPosition.row,
				column: currentPosition.column+1,
				direction: "right"
			}
			childrenPositions.push(children);
		}
		if (currentPosition.row+1 <= rows-1) {
			let children = {
				row: currentPosition.row+1,
				column: currentPosition.column,
				direction: "down"
			}
			childrenPositions.push(children);
		}
		if (currentPosition.column-1 >= 0) {
			let children = {
				row: currentPosition.row,
				column: currentPosition.column-1,
				direction: "left"
			}
			childrenPositions.push(children);
		}
		return childrenPositions;
	}
findChildrenMoves ( rows , columns , currentPosition ) { let childrenPositions = [ ] ; if ( currentPosition . row - 1 >= 0 ) { let children = { row : currentPosition . row - 1 , column : currentPosition . column , direction : "up" } childrenPositions . push ( children ) ; } if ( currentPosition . column + 1 <= columns - 1 ) { let children = { row : currentPosition . row , column : currentPosition . column + 1 , direction : "right" } childrenPositions . push ( children ) ; } if ( currentPosition . row + 1 <= rows - 1 ) { let children = { row : currentPosition . row + 1 , column : currentPosition . column , direction : "down" } childrenPositions . push ( children ) ; } if ( currentPosition . column - 1 >= 0 ) { let children = { row : currentPosition . row , column : currentPosition . column - 1 , direction : "left" } childrenPositions . push ( children ) ; } return childrenPositions ; }
Find the next possible moves given a certain position.
Find the next possible moves given a certain position .
// Top move
 // Right move
 // Down move
 // Left move
