Runs the provided visitor for steps, returning the cell we end at
visitor
steps
// Create visitor & stepperconst visitor = Grids.Visit.create(`row`);const stepper = Grids.Visit.stepper(grid, visitor);// Step by 10stepper(10); // GridCell {x,y}// Step by another 2stepper(2); Copy
// Create visitor & stepperconst visitor = Grids.Visit.create(`row`);const stepper = Grids.Visit.stepper(grid, visitor);// Step by 10stepper(10); // GridCell {x,y}// Step by another 2stepper(2);
Grid to traverse
Visitor function
Start point
Runs the provided
visitor
forsteps
, returning the cell we end at