class Map
Public Class Methods
new(width=nil, height=nil)
click to toggle source
# File lib/delve/generator/map.rb, line 6 def initialize(width=nil, height=nil) @width = width || @@default_width @height = height || @@default_height end
Public Instance Methods
fill(value)
click to toggle source
# File lib/delve/generator/map.rb, line 19 def fill(value) map = Array.new (0..@width-1).each do |x| map << Array.new (0..@height-1).each do map[x] << value end end map end
height()
click to toggle source
# File lib/delve/generator/map.rb, line 15 def height @height end
width()
click to toggle source
# File lib/delve/generator/map.rb, line 11 def width @width end