class StudioGame::ClumsyPlayer

Attributes

boost_factor[R]

Public Class Methods

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

Public Instance Methods

found_treasure(treasure) click to toggle source
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 12
def found_treasure(treasure)
  damaged_treasure = Treasure.new(treasure.name, treasure.points / 2.0)
  super(damaged_treasure)
  # points = treasure.points / 2.0
  # @found_treasures[treasure.name] += points
  # puts "#{@name} found a #{treasure.name} worth #{points}."
end
w00t() click to toggle source
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 20
def w00t
  @boost_factor.times { super }
end