Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created December 1, 2015 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b2b792e2d458acd2d1a5 to your computer and use it in GitHub Desktop.
Save anonymous/b2b792e2d458acd2d1a5 to your computer and use it in GitHub Desktop.
# Pastebin C0BhbviA
require 'green_shoes'
guess = 0
ans = 0
Shoes.app do
while 1
guess = ask("Guess a Numer form 1 - 50")
if guess == ans
alert "Great Job! You guessed the number!"
if confirm("Quit?")
exit
end
end
if guess != ans
if confirm(" You did not guess the number. Quit?")
exit
end
if guess > ans
alert "Try Lower"
end
if guess < ans
alert "Try Higher"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment