-
-
Save videlais/adc76a7f34c5791a5192978e6b68695a to your computer and use it in GitHub Desktop.
Conditional Choices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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