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