Created
February 8, 2018 16:55
-
-
Save kat-perreira/5401e219776284f83915e7b6a4a21d2f to your computer and use it in GitHub Desktop.
Superhero Madlibs created by kaimana_Cat - https://repl.it/@kaimana_Cat/Superhero-Madlibs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is a practice for Ruby Lesson 9 in the Ada Jumpstart program | |
#Introduce the game | |
puts "Hello and Welcome to my SuperHero MadLibs! Please tell me your name:" | |
User = gets.chomp | |
puts "Hello " + User + ", please enter following: " | |
#Collect Variables for Story | |
puts "City:" | |
city = gets.chomp | |
puts "Superhero:" | |
superhero = gets.chomp | |
puts "Restaurant:" | |
restaurant = gets.chomp | |
puts "Villian:" | |
villian = gets.chomp | |
puts "Sling an insult:" | |
insult = gets.chomp | |
puts "Number higher than 1:" | |
number = gets.chomp | |
puts "Food, plural:" | |
food = gets.chomp | |
puts "Body part:" | |
body = gets.chomp | |
#Use Variables to fill in parts of the story | |
puts "Somewhere in "+ city + ", " + superhero + " and " + User + | |
" are having lunch at " + restaurant + "." | |
puts "All of a sudden, " + villian + " bursts thru the door." | |
puts villian + ": " + insult | |
puts superhero + ": " + villian + "! Get Lost or you will regret it!" | |
puts villian + ": Make me!" | |
puts superhero + " grabs " + number + " " + food + " and hurls it at " + villian + "s " + body + "!" | |
puts villian + " is stunned: Alright, I surrender!!!" | |
puts villian + " leaves " + restaurant + " and " + superhero + " and " + | |
User + " continue their "+ food + "-less meal in peace." | |
puts "The End" | |
#Pat myself on the back and grab a cookie to celebrate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment