Skip to content

marfarma/automazerb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

maze generation library for ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published