Maze
A fun little gem to generate and explore mazes.
Mazes
see Mazer::Maze
It’s easy to make a maze :
Maze::Maze.new(5) # will build a 5x5 maze.
Maze::Maze.new(8,6) # will build a 8x6 maze.
Cells
see Mazer::Cell
You can access cells :
maze = Maze(10) # generates the maze
cell = maze[2, 5] # read cell at [2, 5]
cell.north # read cell at [2, 4]
cell.door :west # west door closed => nil
cell.open :east # open the door to [3, 5] => cell at [3, 5]
cell.door_east # east door open => cell at [3, 5]
License
And it’s on GPL V3 too, so you can use, copy, read, share, change, whatever.
see LICENSE for more details