class StudioGame::BerserkPlayer

Attributes

w00t_count[R]

Public Class Methods

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

Public Instance Methods

berserk?() click to toggle source
# File lib/studio_game/berserk_player.rb, line 12
def berserk?
  @w00t_count > 5
end
blam() click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 23
def blam
  if berserk?
    w00t
  else
    super
  end
end
w00t() click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 16
def w00t
  puts "Berserker got w00ted!"
  super
  @w00t_count += 1
  puts "Berserker is berserk!" if berserk?
end