Class: StudioGame::Klutz

Inherits:
Player
  • Object
show all
Defined in:
lib/game/klutz.rb

Instance Attribute Summary

Attributes inherited from Player

#health, #name

Instance Method Summary collapse

Methods inherited from Player

#<=>, #found_treasure, from_csv, #initialize, #item_values, #items, #score, #to_s

Methods included from Playable

#blam, #strong?, #w00t, #weak?

Constructor Details

This class inherits a constructor from StudioGame::Player

Instance Method Details

#found_item(item) ⇒ Object



5
6
7
8
# File 'lib/game/klutz.rb', line 5

def found_item(item)
  new_item = Treasure.new(item.name, item.value / 2)
  super(new_item)
end