Class: RubyGame::ClumsyPlayer

Inherits:
Players
  • Object
show all
Defined in:
lib/ruby_game/clumsy_player.rb

Instance Attribute Summary

Attributes inherited from Players

#health, #name

Instance Method Summary collapse

Methods inherited from Players

#each_treasure, #initialize, #points, #score, #to_s

Methods included from Playable

#blammed, #strong?, #wooted

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