Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

maze generation library for ruby

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

automaze

description

automaze is a maze generator library for ruby. some algorithms include.

ex) Boutaoshi (simple) DugTunnels (little complex)

installation

gem install automaze

usage

require "automaze"
maze = Automaze::Automaze.new(:size_x=>40, :size_y=>30)
puts maze # printing maze

# access panels(x, y)
panel = maze.panels(3,4)
panel.wall? #=> true or false
panel.set_kind(:floor)

# each panels
maze.each_panels do |panel,x,y|
  if panel.wall?
    print "XX"
  else
    print "  "
  end
  puts if x == 0
end

more usage? read example.rb

Something went wrong with that request. Please try again.