Project

automaze

0.0
No commit activity in last 3 years
No release in over 3 years
automaze is a maze generator library for ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

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