July 2015
Intermediate to advanced
286 pages
6h 31m
English
Masking is a powerful technique that opens up many possibilities. We’ve only scratched the surface in this chapter. Take some time and experiment with it, and see what else you can come up with. Here are some ideas to get you started.
Our mazes so far have all been fit into grids bounded by rectangles. Experiment with using masks to shoehorn a maze into a triangle or a circle.
In our Mask class, we used an array of Boolean values to indicate where cells can and cannot exist. If, instead of Booleans, we use integers, we end up with the possibility of multi-state masks, allowing us to describe multiple different regions within the grid. One use for this is to split the grid into multiple pieces, run ...
Read now
Unlock full access