Module: StudioGame::Printable
Instance Method Summary
collapse
Methods included from GameStats
#print_high_scores, #print_stats, #print_strength_stats, #print_treasure_stats, #total_points
Methods included from Formatting
#format_dot_spacing, #format_section_title
Instance Method Details
#print_health_status ⇒ Object
9
10
11
|
# File 'lib/studio_game/printable.rb', line 9
def print_health_status
"#{name} (#{health} health)"
end
|
26
27
28
29
30
31
32
|
# File 'lib/studio_game/printable.rb', line 26
def print_player_information
puts "\nThere are #{players.size} players in #{title}:"
players.each do |player|
puts player
end
end
|
#print_score ⇒ Object
13
14
15
|
# File 'lib/studio_game/printable.rb', line 13
def print_score
format_dot_spacing(name, score)
end
|
#print_treasure_trove ⇒ Object
17
18
19
20
21
22
23
24
|
# File 'lib/studio_game/printable.rb', line 17
def print_treasure_trove
treasures = TreasureTrove::TREASURES
puts "\nThere are #{treasures.size} treasures to be found:"
treasures.each_with_index do |treasure, number|
puts "#{number + 1}. #{treasure}"
end
end
|
#print_treasures ⇒ Object
34
35
36
37
38
39
40
41
42
|
# File 'lib/studio_game/printable.rb', line 34
def print_treasures
puts "\n#{name}'s treasures:"
found_treasures.each do |name, points|
puts "#{points} total #{name} points"
end
puts "#{name}'s total treasure points: #{points}"
end
|