Runs the provided visitor for steps, returning the cell we end at
visitor
steps
// Get a cell 10 steps away (row-wise) from startconst cell = visitFor(grid, start, 10, visitorRow); Copy
// Get a cell 10 steps away (row-wise) from startconst cell = visitFor(grid, start, 10, visitorRow);
Grid to traverse
Start point
Number of steps
Visitor function
Runs the provided
visitor
forsteps
, returning the cell we end at