-
-
Save jasondown/7c6fb8b100a8f3440515bb478fd31c9d to your computer and use it in GitHub Desktop.
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
Customer 1 is still hungry and orders another | |
Vend item to customer 1 | |
New stock: 4 | |
Customer 3 is still hungry and orders another | |
Vend item to customer 3 | |
New stock: 3 | |
Customer 3 is still hungry and orders another | |
Vend item to customer 3 | |
New stock: 2 | |
Request current stock: 2 | |
Customer 3 is still hungry and orders another | |
Vend item to customer 3 | |
New stock: 1 | |
Customer 1 is still hungry and orders another | |
Vend item to customer 1 | |
New stock: 0 | |
Customer 3 is still hungry and orders another | |
Request for customer 3 will be fulfilled after machine is restocked | |
Customer 2 is still hungry and orders another | |
Request for customer 2 will be fulfilled after machine is restocked | |
Customer 3 is getting full, so stops ordering | |
Restocking with 10 | |
Current stock: 10 | |
Vend item to customer 3 | |
New stock: 9 | |
Vend item to customer 2 | |
New stock: 8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment