Following a discussion with @colinmacc about bitwise operations and mazes, I started thinking how I would go about managing walls in a maze. In this example I basically use a wall-grid which is 1 wider and 1 higher than the cell-grid. I then pre-calculate a list of cell-to-wall indexes for the wall-status list, to keep track of each cell's walls. This means each wall status is only stored in one place, while two cells have a reference to it. Click the cells or walls to toggle their status. Press S to change grid width and height (number of cells, odd numbers from 3 to 19). All code by me (@kriblo). Thank you @colinmacc for the inspiration.