Skip to content

Instantly share code, notes, and snippets.

View BrianDunlap89's full-sized avatar

Brian Dunlap BrianDunlap89

View GitHub Profile
require "pry"
require "set"
word_list = [
"chicken", "dog", "duck", "cat", "clown", "brick",
"bananas", "totalitarianism", "Wednesday", "chicanery",
"ruby", "evaluation", "consternation"
]
MAX_TURNS = 6
require "pry"
word_list = [
"chicken", "dog", "duck", "cat", "clown", "brick",
"bananas", "totalitarianism", "Wednesday", "chicanery",
"ruby", "evaluation", "consternation"
]
turn_count = 6
answer = word_list.sample.downcase
num = rand(1..100)
puts "I'm thinking of a number between 1 and 100."
puts "What's your first guess?"
guess = gets.chomp.to_i
while guess != num
if guess > num
puts "Oops, that guess was too high. Try again!"
else