class StudioGame::ClumsyPlayer
Attributes
boost[R]
Public Class Methods
new(name, health=100)
click to toggle source
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 7 def initialize (name, health=100) super(name, health) @boost = (1..10).to_a.sample end
Public Instance Methods
found_treasure(treasure)
click to toggle source
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 16 def found_treasure(treasure) damaged_treasue = Treasure.new(treasure.name, treasure.points / 2) super (damaged_treasue) end
w00t()
click to toggle source
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 12 def w00t @boost.times { super } end