Class: CaveGen::Cave
- Inherits:
-
Object
- Object
- CaveGen::Cave
- Defined in:
- lib/cave_gen.rb
Instance Method Summary collapse
- #get_string ⇒ Object
-
#initialize(height = 20, width = 20, error = 100, opacity = 7) ⇒ Cave
constructor
A new instance of Cave.
- #show_map ⇒ Object
- #to_symbol_array ⇒ Object
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_string ⇒ Object
17 18 19 |
# File 'lib/cave_gen.rb', line 17 def get_string @map.to_s end |
#show_map ⇒ Object
13 14 15 |
# File 'lib/cave_gen.rb', line 13 def show_map @map.show_map end |
#to_symbol_array ⇒ Object
21 22 23 |
# File 'lib/cave_gen.rb', line 21 def to_symbol_array @map.to_symbol_array end |