Skip to content

Instantly share code, notes, and snippets.

@jasondown
Created December 23, 2021 20:02
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 jasondown/7cb16b0d2b3299f5de6082d86d865e86 to your computer and use it in GitHub Desktop.
Save jasondown/7cb16b0d2b3299f5de6082d86d865e86 to your computer and use it in GitHub Desktop.
Customer 1 is still hungry and orders another
Request for customer 1 will be fulfilled after machine is restocked
Customer 3 is still hungry and orders another
Request for customer 3 will be fulfilled after machine is restocked
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 still hungry and orders another
Request for customer 3 will be fulfilled after machine is restocked
Restocking with 10
Current stock: 10
Vend item to customer 1
New stock: 9
Vend item to customer 3
New stock: 8
Vend item to customer 3
New stock: 7
Vend item to customer 2
New stock: 6
Vend item to customer 3
New stock: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment