9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/lotrd/c-leaderboardController.rb', line 9
def (input)
narcissist = input
player = YAML.load(File.read("m-playerdata.yml"))
achievement = player.achievements
if (narcissist > 3 && achievement.include?('Narcissist') == false)
achievement << 'Narcissist'
player.achievements = achievement
File.open('m-playerdata.yml', 'w') {|file| File.write('m-playerdata.yml', player.to_yaml)}
Leaderboard::start
else
narcissist += 1
end
prompt = TTY::Prompt.new
prompt.select("Are you done mirin'?") do ||
.choice "Yeah, let's get back to it...".colorize(:green), -> {::Town.}
.choice "Nah, not yet...".colorize(:red), -> {::LeaderboardController.(narcissist)}
end
end
|