class GamalielPelino::BerserkerPLayer

Public Class Methods

new(name, health=100) click to toggle source
Calls superclass method GamalielPelino::Player::new
# File lib/GamalielPelino/Agam20_2.rb, line 6
def initialize(name, health=100)
    super(name, health)
    @w00t_count = 0
end

Public Instance Methods

berserk?() click to toggle source
# File lib/GamalielPelino/Agam20_2.rb, line 11
def berserk?
    @w00t_count > 5
end
blam() click to toggle source
Calls superclass method Playable#blam
# File lib/GamalielPelino/Agam20_2.rb, line 21
def blam
    berserk? ? w00t : super
end
w00t() click to toggle source
Calls superclass method Playable#w00t
# File lib/GamalielPelino/Agam20_2.rb, line 15
def w00t
    super
    @w00t_count +=1
    puts "#{@name} is berserk!" if berserk?
end