Created
July 17, 2018 17:51
-
-
Save mattb20/6564643cb9f72d73b454b829c9dccae6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
while true do | |
puts 'Enter north or south:' | |
user_input = gets.chomp | |
if user_input == 'north' | |
puts 'You are in a scary cave.' | |
puts 'Enter north or south:' | |
user_input = gets.chomp | |
if user_input == 'north' | |
puts 'You walk into sunlight.' | |
break | |
else | |
puts 'You are in a scary passage.' | |
end | |
else | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment