July 2015
Intermediate to advanced
286 pages
6h 31m
English
Just as hexagon grids produce sigma mazes, so triangle grids produce delta mazes. (This one at least makes a little sense, since the Greek letter delta, Δ, is shaped like a triangle.) Again, though, it makes little difference what you call it, because in the end it’s just another scaffolding for making mazes!
Let’s copy our hex_maze.rb file to delta_maze.rb and change it to refer to our new triangle grid:
| delta_maze.rb | |
| | require 'recursive_backtracker' |
* | require 'triangle_grid' |
| | |
* | grid = TriangleGrid.new(10, 17) |
| | RecursiveBacktracker.on(grid) |
| | |
* | grid.to_png.save('delta.png') |
The dimensions for the grid were empirically chosen to produce a roughly square canvas. Aside from that, it’s just the same old deal—instantiating ...
Read now
Unlock full access