Class: CoopAl::LootGenerator

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

Overview

LootGenerator

Instance Method Summary collapse

Constructor Details

#initializeLootGenerator

Returns a new instance of LootGenerator.



6
7
# File 'lib/coop_al/loot_generator.rb', line 6

def initialize
end

Instance Method Details

#generate(cr, treasure) ⇒ Object



9
10
11
12
13
# File 'lib/coop_al/loot_generator.rb', line 9

def generate(cr, treasure)
  return Loot.empty if treasure == :no_treasure
  return generate_individual(cr) if treasure == :individual
  generate_hoard(cr)
end