mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 17:50:39 +08:00
removed console lines from RatInAMaze
This commit is contained in:
@ -13,7 +13,6 @@ const outOfBoundary = (grid, currentRow, currentColumn) => {
|
|||||||
const isPossible = (grid, currentRow, currentColumn) => {
|
const isPossible = (grid, currentRow, currentColumn) => {
|
||||||
if (outOfBoundary(grid, currentRow, currentColumn)) return false
|
if (outOfBoundary(grid, currentRow, currentColumn)) return false
|
||||||
|
|
||||||
console.log(currentRow, currentColumn)
|
|
||||||
if (grid[currentRow][currentColumn] === 0) return false
|
if (grid[currentRow][currentColumn] === 0) return false
|
||||||
|
|
||||||
if (currentRow === targetRow && currentColumn === targetColumn) {
|
if (currentRow === targetRow && currentColumn === targetColumn) {
|
||||||
@ -41,8 +40,8 @@ const isPossible = (grid, currentRow, currentColumn) => {
|
|||||||
const grid = [
|
const grid = [
|
||||||
[1, 1, 1, 1],
|
[1, 1, 1, 1],
|
||||||
[1, 0, 0, 1],
|
[1, 0, 0, 1],
|
||||||
[0, 1, 0, 1],
|
[0, 0, 1, 0],
|
||||||
[1, 1, 1, 1]
|
[1, 1, 0, 1]
|
||||||
]
|
]
|
||||||
|
|
||||||
const targetRow = grid.length - 1
|
const targetRow = grid.length - 1
|
||||||
|
Reference in New Issue
Block a user