removed console lines from RatInAMaze

This commit is contained in:
Chiranjeev
2021-08-22 22:46:29 +05:30
parent 832aa6ea06
commit 9b37cb0705

View File

@ -13,7 +13,6 @@ const outOfBoundary = (grid, currentRow, currentColumn) => {
const isPossible = (grid, currentRow, currentColumn) => {
if (outOfBoundary(grid, currentRow, currentColumn)) return false
console.log(currentRow, currentColumn)
if (grid[currentRow][currentColumn] === 0) return false
if (currentRow === targetRow && currentColumn === targetColumn) {
@ -41,8 +40,8 @@ const isPossible = (grid, currentRow, currentColumn) => {
const grid = [
[1, 1, 1, 1],
[1, 0, 0, 1],
[0, 1, 0, 1],
[1, 1, 1, 1]
[0, 0, 1, 0],
[1, 1, 0, 1]
]
const targetRow = grid.length - 1