Skip to content

Instantly share code, notes, and snippets.

@MyElectricSheep
Forked from nextacademy-private/deaf_aunty.rb
Last active March 28, 2016 03:21
Show Gist options
  • Select an option

  • Save MyElectricSheep/e8db73eb9a7667dec85e to your computer and use it in GitHub Desktop.

Select an option

Save MyElectricSheep/e8db73eb9a7667dec85e to your computer and use it in GitHub Desktop.
#This is the Deaf Aunty Program v0.1 beta
puts "The door opens creaking."
puts "You walk towards your aunty, she sits facing the window, and turns to you."
puts "You say:"
#Set initial counter
count = 0
#Create Loop Conditions
while count < 3
sandra_says = gets.chomp
if sandra_says == sandra_says.upcase && sandra_says != ""
puts "Your aunty yells: NO, WE CAN'T DO THAT!"
count=0
elsif sandra_says == sandra_says.downcase && sandra_says != ""
puts "Your aunty yells: HUH?! SPEAK UP, SANDRA!"
count=0
elsif sandra_says == "I love ya, aunty, but I've got to go."
puts "Your aunty mumbles something inintelligible and then yells WHAT!?"
count+=1
else sandra_says = nil
# Aunty ignores Sandra but the count increases by 1
puts "..."
count+=1
end
# Aunty says bye after 3 count
if count == 3
puts "Your aunty now stares silently at the outside world through the window. She sighs. OK. Fine. Just leave then..."
puts "You exit finally silently through the door, and close it behind you..."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment