Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class String
- def black; "\033[30m#{self}\033[0m" end
- def red; "\033[31m#{self}\033[0m" end
- def green; "\033[32m#{self}\033[0m" end
- def brown; "\033[33m#{self}\033[0m" end
- def blue; "\033[34m#{self}\033[0m" end
- def magenta; "\033[35m#{self}\033[0m" end
- def cyan; "\033[36m#{self}\033[0m" end
- def gray; "\033[37m#{self}\033[0m" end
- def bg_black; "\033[40m#{self}\033[0m" end
- def bg_red; "\033[41m#{self}\033[0m" end
- def bg_green; "\033[42m#{self}\033[0m" end
- def bg_brown; "\033[43m#{self}\033[0m" end
- def bg_blue; "\033[44m#{self}\033[0m" end
- def bg_magenta; "\033[45m#{self}\033[0m" end
- def bg_cyan; "\033[46m#{self}\033[0m" end
- def bg_gray; "\033[47m#{self}\033[0m" end
- def bold; "\033[1m#{self}\033[22m" end
- def reverse_color; "\033[7m#{self}\033[27m" end
- end
- puts "We now need to ask you some questions to prove that you are a human.".green.bold.bg_cyan
- stop = false
- tries = 0
- while stop == false
- win = 5
- puts "Which of the following is NOT a real country?".green.bold
- puts " a\) Sudan".blue
- puts " b\) Canada".blue
- puts " c\) The Yukon".blue
- puts " d\) Luxembourg".blue
- questionOne = gets.to_s
- if questionOne != "c"
- win -= 1
- end
- puts "Which of the following is traditionally made in Russia?".green.bold
- puts " a\) Vodka".blue
- puts " b\) Ale".blue
- puts " c\) Wine".blue
- puts " d\) Whiskey".blue
- questionTwo = gets.to_s
- if questionTwo != "a"
- win -= 1
- end
- puts "What is the square root of 49?".green.bold
- puts " a\) 3.14".blue
- puts " b\) 16".blue
- puts " c\) Impossible!".blue
- puts " d\) 7".blue
- questionThree = gets.to_s
- if questionThree != "d"
- win -= 1
- end
- puts "What is the scientific name of humans?".green.bold
- puts " a\) Humanus Intelligentio".blue
- puts " b\) Primanus Homo".blue
- puts " c\) Homo Sapiens".blue
- puts " d\) Primanus Brilliante".blue
- questionFour = gets.to_s
- if questionFour != "c"
- win -= 1
- end
- puts "What is the terminated Skylanders mmo called?".green.bold
- puts " a\) Skylanders: Spyro's Adventure".blue
- puts " b\) Skylanders: Universe".blue
- puts " c\) Skylanders: Battlegrounds".blue
- puts " d\) Skylanders: Lightning Rod versus The Cyclops Queen".blue
- questionFive = gets.to_s
- if questionFive != "b"
- win -= 1
- end
- if win >= 5
- win = 5
- end
- if win > 3
- haveWon = true
- puts "You've Won! Welcome to Sky Tech".green
- stop = true
- else
- tries += 1
- if tries == 10
- stop = true
- puts "You have failed!".red
- haveWon = false
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement