(matrix, row, rows, col, cols, direction)
| 288 | }; |
| 289 | |
| 290 | const canMove = (matrix, row, rows, col, cols, direction) => { |
| 291 | if (!isInBounds(row, rows, col, cols, direction)) return false; |
| 292 | |
| 293 | return !hasSeen(matrix, row, col, direction); |
| 294 | }; |
| 295 | |
| 296 | const isInBounds = (row, rows, col, cols, direction) => { |
| 297 | const [_row, _col] = getCell(row, col, direction); |
no test coverage detected