Class: CaveGen::Cave

Inherits:
Object
  • Object
show all
Defined in:
lib/cave_gen.rb

Instance Method Summary collapse

Constructor Details

#initialize(height = 20, width = 20, error = 100, opacity = 7) ⇒ Cave

Returns a new instance of Cave.



6
7
8
9
10
11
# File 'lib/cave_gen.rb', line 6

def initialize(height = 20, width = 20, error = 100, opacity = 7)
  @map = Map.new(height, width, error, opacity)
  @map.generate_map

  @map
end

Instance Method Details

#get_stringObject



17
18
19
# File 'lib/cave_gen.rb', line 17

def get_string
  @map.to_s
end

#show_mapObject



13
14
15
# File 'lib/cave_gen.rb', line 13

def show_map
  @map.show_map
end

#to_symbol_arrayObject



21
22
23
# File 'lib/cave_gen.rb', line 21

def to_symbol_array
  @map.to_symbol_array
end