Class: RubyGame::ClumsyPlayer
- Defined in:
- lib/ruby_game/clumsy_player.rb
Instance Attribute Summary
Attributes inherited from Players
Instance Method Summary collapse
Methods inherited from Players
#each_treasure, #initialize, #points, #score, #to_s
Methods included from Playable
Constructor Details
This class inherits a constructor from RubyGame::Players
Instance Method Details
#found_treasure(treasure) ⇒ Object
4 5 6 7 |
# File 'lib/ruby_game/clumsy_player.rb', line 4 def found_treasure(treasure) damaged_treasure = Treasure.new(treasure.name, treasure.points/2.0) super(damaged_treasure) end |