class StudioGame::BerserkPlayer

Attributes

woot_count[R]

Public Class Methods

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

Public Instance Methods

berserk?() click to toggle source
# File lib/studio_game/berserk_player.rb, line 24
def berserk?
  return true if @w00t_count > 5
  return false
end
blam() click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 18
def blam
  # berserk? ? w00t : super
  w00t      if berserk?
  super unless berserk?
end
w00t() click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 12
def w00t
  super
  @w00t_count += 1
  puts "#{@name} is berserk!" if berserk?
end