Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Stack-based Ruby maze generator

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.md
Octocat-spinner-32 maze.rb
README.md

Maze.rb

This is an example of depth-first maze generation. Run it like so to see how a 2-dimensional array turns into a maze when it's explored via a stack in random order.

Usage:

Just rewrite this yourself. Seriously, it's a fun exercise. Do it in, like, Lisp or something. But if you want to run this version, save the maze.rb to your computer and run:

ruby maze.rb 20 20 > maze.html && open maze.html
Something went wrong with that request. Please try again.