Skip to content

Instantly share code, notes, and snippets.

@videlais
Created August 4, 2018 01:11
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 videlais/adc76a7f34c5791a5192978e6b68695a to your computer and use it in GitHub Desktop.
Save videlais/adc76a7f34c5791a5192978e6b68695a to your computer and use it in GitHub Desktop.
Conditional Choices
It was our first date and we hadn't made dinner plans.
He turned to me. "What should we eat?"
-> Pizza_Choices
=== Pizza_Choices ===
+ {Pizza < 1} [Pizza?]
-> Pizza
+ {Pizza} {Salad < 1} [Salad?]
-> Salad
+ {Pizza} {Salad} {Nothing < 2} [Nothing?]
-> Nothing
+ {Pizza} {Salad} {Nothing} [Sushi?]
-> Sushi
=== Pizza ===
He shook his head. "I don't like pizza."
-> Pizza_Choices
=== Sushi ===
"Sushi sounds good!"
-> DONE
=== Salad ===
"Not a salad."
-> Pizza_Choices
=== Nothing ===
{"We have to eat something!"|"Stop being silly!"}
-> Pizza_Choices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment