class StudioGame::BeserkPlayer
Public Class Methods
new(name,health)
click to toggle source
Calls superclass method
# File lib/studio_game/beserk_player.rb, line 7 def initialize(name,health) super(name,health) @w00ts_count = 0 end
Public Instance Methods
beserk?()
click to toggle source
# File lib/studio_game/beserk_player.rb, line 12 def beserk? @w00ts_count > 5 end
blam()
click to toggle source
Calls superclass method
# File lib/studio_game/beserk_player.rb, line 22 def blam beserk? ? w00t : super end
w00t()
click to toggle source
Calls superclass method
# File lib/studio_game/beserk_player.rb, line 16 def w00t super @w00ts_count += 1 puts "#{name} is beserk!" if beserk? end