Class: ClumsyPlayer
- Inherits:
-
TextGame::Player
- Object
- TextGame::Player
- ClumsyPlayer
- Defined in:
- lib/text_game/clumsy_player.rb
Instance Attribute Summary
Attributes inherited from TextGame::Player
Instance Method Summary collapse
Methods inherited from TextGame::Player
#each_treasure, from_csv, #initialize, #points_accumulated, #to_csv, #to_s
Methods included from Playable
Constructor Details
This class inherits a constructor from TextGame::Player
Instance Method Details
#found_treasure(treasure) ⇒ Object
5 6 7 8 |
# File 'lib/text_game/clumsy_player.rb', line 5 def found_treasure treasure @treasure_points[treasure.name] += treasure.points/2 puts "#{@name} found #{treasure.name} worth #{treasure.points/2}" end |