class StudioGame::ClumsyPlayer

Attributes

boost_factor[R]

Public Class Methods

new(name, health=100, boost_factor =1) click to toggle source
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 8
def initialize(name, health=100, boost_factor =1)
        super(name, health)
        @boost_factor = boost_factor
end

Public Instance Methods

found_treasure(treasure) click to toggle source

overriding found_treasure method for clumsy player.

Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 18
def found_treasure(treasure)
     damaged_treasure = Treasure.new(treasure.name, treasure.points/2.0)
     super(damaged_treasure)
end
woot() click to toggle source
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 13
def woot
        @boost_factor.times {super}
end