Your Turn

You’re pretty much on the path to world domination now. Not only can you generate random mazes, you can display them, too! You’ve played with a few variations and tried some tricks of your own, and you’re feeling pretty confident about it all.

Now for the fun part. Here’s where you get to explore some on your own, seeing where your ideas take you. If you’re feeling a bit starved for ideas still, browse some of the following for inspiration!

Grids

The implementation in this chapter is only one of many possible ways to represent a grid. Here are two other ways to think about the problem. Perhaps you can think of a few more as well!

Bitfield Grids

Instead of an array of Cell objects, what if you went bare metal and simply used an array ...

Get Mazes for Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.