-
Notifications
You must be signed in to change notification settings - Fork 0
/
MadLibs.rb
25 lines (15 loc) · 844 Bytes
/
MadLibs.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
def prompt_player(requested)
puts "Please give me a #{requested}."
return gets.chomp
end
first_string = prompt_player("verb")
second_string = prompt_player("place")
third_string = prompt_player("name")
fourth_string = prompt_player("noun")
fifth_string = prompt_player("body part")
sixth_string = prompt_player("adjective")
seventh_string = prompt_player("place")
eighth_string = prompt_player("game title")
ninth_string = prompt_player("any time of day")
# When we are done asking all questions we through all the player answers together and make it a short story.
puts "One time while I was #{first_string} to #{second_string}, I saw my friend #{third_string}. S/he was holding a #{fourth_string} in their #{fifth_string}.It was so #{sixth_string}! We ran to #{seventh_string} and played #{eighth_string} until #{ninth_string}."