class ToccoStudioGame::BerserkPlayer

Public Class Methods

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

Public Instance Methods

berserk?() click to toggle source
# File lib/tocco_studio_game/berserk_player.rb, line 9
def berserk?
        if @w00tCount > 5
                true
        else
                false
        end
end
blam() click to toggle source
Calls superclass method
# File lib/tocco_studio_game/berserk_player.rb, line 22
def blam
        if berserk?
                w00t
                else
                        super
        end
end
w00t() click to toggle source
Calls superclass method
# File lib/tocco_studio_game/berserk_player.rb, line 17
def w00t
        super
        @w00tCount += 1
        puts "#{@name} is berserk!" if berserk?
        end