class StudioGame::BerserkPlayer

Public Class Methods

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

Public Instance Methods

berserk?() click to toggle source
# File lib/studio_game/berserk_player.rb, line 22
def berserk?
    if @woot_count > 5
        return true
    else
        return false
    end
end
blam() click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 18
def blam
    berserk? ? woot : super
end
woot() click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 10
def woot
    super()
    @woot_count += 1
    
    puts "#{@name} is in berserker mode!" if berserk?
    
end