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 6
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
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 15
def found_treasure (treasure)
  super(Treasure.new(treasure.name, treasure.points / 2.0))
  # @found_treasures[treasure.name] += treasure.points/2.0
  # puts "#{@name} found a #{treasure.name} worth #{treasure.points} points."
  # puts "#{@name}'s treasures #{@found_treasures}"
end
w00t() click to toggle source
Calls superclass method
# File lib/studio_game/clumsy_player.rb, line 11
def w00t
  @boost_factor.times{ super }
end