Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions menu.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#Arrays of descriptors/food, could have user input them and push into Arrays

adjective_one = ["smelly", "noisey", "hot", "cold", "freezing", "tepid",
"squishy", "pungent", "fuzzy", "crazy"]

adjective_two = ["smoked", "boiled", "crunchy", "sweet", "soft", "raw",
"okay", "weird", "normal", "sharp"]

actual_food = ["salmon", "turnips", "sprouts", "steak", "sushi", "cauliflower",
"cheese", "dumplings", "kale", "meatballs"]

# Get user input for menu length

puts "How many menu items would you like to choose from?"
menu_items = gets.chomp.to_i

# Make sure menu length is between 1 and 10

until menu_items <= 10 && menu_items > 0
puts "Please enter a number between 1 and 10."
menu_items = gets.chomp.to_i
end

# Prints menu from menu length and arrays

puts "Here's what's on the menu today: "

num = 0

menu_items.times do
num += 1
adj_one = adjective_one.sample
adj_two = adjective_two.sample
food = actual_food.sample
puts "#{num}. #{adj_one}, #{adj_two}, #{food}"
adjective_one.delete(adj_one)
adjective_two.delete(adj_two)
actual_food.delete(food)
end