Class: CootieCatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/cootie_catcher.rb

Constant Summary collapse

COLORS =
["RED", "GREEN", "PINK", "YELLOW", "ORANGE", "BLUE", "BLACK", "WHITE", "MAGENTA", "ROSE GOLD", "GREY", "SILVER"]
NUMBERS =
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
FORTUNES =
[
  "Do not mistake temptation for opportunity.",
  "Never wear your best pants when you go to fight for freedom.",
  "Your friends secretly agree that your head is too small for your body.",
  "Accept that some days you're the pigeon and some days you're the statue.",
  "Don't fry bacon in the nude.",
  "When everything's coming your way, you're probably in the wrong lane.",
  "Hearty laughter is a good way to jog internally without having to go outdoors.",
  "Life will be happy, until the end when you'll pee yourself a lot.",
  "A thrilling time is in your immediate future.",
  "An alien of some sort will be appearing to you shortly!",
  "You will find a thing and it will be important.",
  "You are cleverly disguised as a responsible adult.",
  "You will soon have an out of money exprience.",
  "He who dies with most money, still dies.",
  "Look before you leap. Or wear a parachute.",
  "The end is near, mine as well have dessert.",
  "Your pet is planning to eat you.",
  "Don't trust your cat.",
  "A lucrative career change awaits. Have you considered gangsta rap?",
]

Instance Method Summary collapse

Instance Method Details

#continueObject



41
42
43
44
45
46
47
48
# File 'lib/cootie_catcher.rb', line 41

def continue
  if valid_number?
    second_number
  else
    print_bad_number_input_message
    play
  end
end

#playObject



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/cootie_catcher.rb', line 29

def play
  color
  if valid_color?
    number
    continue
  else
    print_bad_color_input_message
    play
  end
  fortune
end