class StudioGame::BerserkPlayer
Public Class Methods
new(name, health)
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 7 def initialize(name, health) super(name, health) @w00t_count = 0 end
Public Instance Methods
berserk?()
click to toggle source
# File lib/studio_game/berserk_player.rb, line 12 def berserk? @w00t_count > 5 ? true : false end
blam()
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 22 def blam berserk? ? w00t : super end
w00t()
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 16 def w00t super @w00t_count += 1 puts "Berserker is berserk" if berserk? end