Class: WSGame::ClumsyPlayer
- Inherits:
-
Player
- Object
- Player
- WSGame::ClumsyPlayer
- Defined in:
- lib/wsgame/class_player_clumpsy.rb
Instance Method Summary collapse
- #found_treasure(tr) ⇒ Object
-
#initialize(pname, phealth, boost = 1) ⇒ ClumsyPlayer
constructor
A new instance of ClumsyPlayer.
- #w00t ⇒ Object
Constructor Details
#initialize(pname, phealth, boost = 1) ⇒ ClumsyPlayer
Returns a new instance of ClumsyPlayer.
9 10 11 12 13 |
# File 'lib/wsgame/class_player_clumpsy.rb', line 9 def initialize(pname,phealth, boost=1) super(pname,phealth) @boost=boost end |
Instance Method Details
#found_treasure(tr) ⇒ Object
21 22 23 24 |
# File 'lib/wsgame/class_player_clumpsy.rb', line 21 def found_treasure(tr) tr.points=tr.points/2 super end |
#w00t ⇒ Object
15 16 17 18 |
# File 'lib/wsgame/class_player_clumpsy.rb', line 15 def w00t @boost.times {super} end |