maze generation library for ruby
Ruby
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
test
.gitignore
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
VERSION

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