class BerserkPlayer
Attributes
w00tcount[R]
Public Class Methods
new(name, health)
click to toggle source
Calls superclass method
Player::new
# File lib/berserkplayer.rb, line 4 def initialize(name, health) super(name, health) @w00tcount = 0 end
Public Instance Methods
berserk?()
click to toggle source
# File lib/berserkplayer.rb, line 22 def berserk? if @w00tcount > 5 true else false end end
blam()
click to toggle source
Calls superclass method
Playable#blam
# File lib/berserkplayer.rb, line 15 def blam if @w00tcount > 5 w00t else super() end end
w00t()
click to toggle source
Calls superclass method
Playable#w00t
# File lib/berserkplayer.rb, line 8 def w00t @w00tcount += 1 if @w00tcount > 5 puts "#{name} is berserk!!" end super() end