class StudioGame::BerserkPlayer

Public Class Methods

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

Public Instance Methods

berserk?() click to toggle source
# File lib/studio_game/berserk_player.rb, line 12
def berserk?
  @woot_count > 5
end
blam() click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 31
def blam 

  if berserk? 
    woot
  else
    super
  end

end
woot() click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 16
def woot

  super
  @woot_count += 1

  if berserk?
    puts "I'M BERSERK!!!!"
  end

  if @woot_count == 4
    puts "I'm about to go berserk...you won't like me when I'm berserk..."
  end

end