class StudioGame::BerserkPlayer
Public Class Methods
new(name, health)
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 6 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 11 def berserk? @woot_count > 5 end
blam()
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 21 def blam berserk? ? woot : super end
woot()
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 15 def woot super @woot_count += 1 puts "Berserker is berserk!" if @woot_count > 5 end