Visits every cell in grid using supplied selection function
In-built functions to use: visitorDepth, visitorBreadth, visitorRandom,
visitorColumn, visitorRow.
Usage example:
letvisitor = Grids.visitor(Grids.visitorRandom, grid, startCell); for (letcellofvisitor) { // do something with cell }
If you want to keep tabs on the visitor, pass in a MutableValueSet. This is
updated with visited cells (and is used internally anyway)
Visits every cell in grid using supplied selection function In-built functions to use: visitorDepth, visitorBreadth, visitorRandom, visitorColumn, visitorRow.
Usage example:
If you want to keep tabs on the visitor, pass in a MutableValueSet. This is updated with visited cells (and is used internally anyway)
To visit with some delay, try this pattern