class StudioGame::BerserkPlayer
Public Class Methods
new(name, health=100)
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 5 def initialize(name, health=100) super(name, health) @w00ts = 0 end
Public Instance Methods
berserk?()
click to toggle source
# File lib/studio_game/berserk_player.rb, line 10 def berserk? @w00ts > 5 end
blam()
click to toggle source
Calls superclass method
# File lib/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/studio_game/berserk_player.rb, line 14 def w00t super @w00ts += 1 if berserk? puts "#{@name} is berserk!" end end