Method: StudioGame::Player#found_treasure

Defined in:
lib/studio_game/player.rb

#found_treasure(treasure) ⇒ Object



35
36
37
38
39
# File 'lib/studio_game/player.rb', line 35

def found_treasure(treasure)
	@found_treasures[treasure.name] += treasure.points
	puts "#{@name} then found a #{treasure.name} - that's worth #{treasure.points}pts!"
	puts "#{@name}'s treasure chest (#{@found_treasures}) is now worth #{@found_treasures.values.reduce(:+)}pts"
end