class StudioGame::BerserkPlayer
Public Class Methods
new(player_name, player_health=100)
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 4 def initialize(player_name, player_health=100) @wooted_times = 0 super(player_name, player_health) end
Public Instance Methods
berserk?()
click to toggle source
# File lib/studio_game/berserk_player.rb, line 19 def berserk? @wooted_times > 5 end
blam()
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 15 def blam self.berserk? ? self.w00t : super end
w00t()
click to toggle source
Calls superclass method
# File lib/studio_game/berserk_player.rb, line 9 def w00t super @wooted_times += 1 puts "#{@name} is berserk!" if self.berserk? end