class TreasureHunt::ClumsyPlayer
Attributes
boost[R]
Public Class Methods
new(name, health=100, boost=1)
click to toggle source
Calls superclass method
# File lib/treasure_game/clumsy_player.rb, line 7 def initialize(name, health=100, boost=1) super(name, health) @boost = boost end
Public Instance Methods
found_treasure(treasure)
click to toggle source
Calls superclass method
# File lib/treasure_game/clumsy_player.rb, line 16 def found_treasure(treasure) super((Treasure.new(treasure.name, treasure.points / Integer(2.0)))) end
heal()
click to toggle source
Calls superclass method
# File lib/treasure_game/clumsy_player.rb, line 12 def heal @boost.times { super } end