24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/new_game_scores/cli.rb', line 24
def start
welcome
input = nil
while input != 'exit'
puts ""
puts " Please type the number or the name of the platform that you would like to see the latest reviews for."
puts ""
puts " If you would like to exit the program please type 'Exit'."
puts ""
input = gets.strip.upcase
if input != 'EXIT'
puts " What is the minimum score you would like to see a list of? (1-100)"
puts ""
score = gets.strip.upcase
end
score
if input == "PS4" || input == "1"
list("PS4", "http://www.metacritic.com/browse/games/release-date/new-releases/ps4/metascore", score)
elsif input == "XBOX ONE" || input == "2"
list("Xbox One", "http://www.metacritic.com/browse/games/release-date/new-releases/xboxone/metascore", score)
elsif input == "PC" || input == "3"
list("PC", "http://www.metacritic.com/browse/games/release-date/new-releases/pc/metascore", score)
elsif input == "WII U" || input == "4"
list("Wii U", "http://www.metacritic.com/browse/games/release-date/new-releases/wii-u/metascore", score)
elsif input == "3DS" || input == "5"
list("3ds", "http://www.metacritic.com/browse/games/release-date/new-releases/3ds/metascore", score)
elsif input == "EXIT"
puts " Goodbye!"
exit == true
end
end
end
|