Class: WSGame::ClumsyPlayer

Inherits:
Player
  • Object
show all
Defined in:
lib/wsgame/class_player_clumpsy.rb

Instance Method Summary collapse

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

#w00tObject



15
16
17
18
# File 'lib/wsgame/class_player_clumpsy.rb', line 15

def w00t
@boost.times {super}

end