blahosyl/dinner-party

Compare shopping list to pantry

Closed this issue · 1 comments

User goal: adjust the shopping list based on the ingredients already available

Possible implementation:

  • At the end of the program, before the goodbye screen, ask user if they want to compare shopping list to pantry
    • validate answer (Y/N)
  • loop through each ingredient, and ask how much they have
    • can only enter a float (can use a similar validation as for dish selection)
    • subtract entered number from quantity on shopping list
    • if shopping list quantity <= zero, delete item from shopping list
  • print revised shopping list
  • make new function a method of the ShoppingList object
  • integrate new function into existing flow

Add logic for case where all ingredients are in the pantry, so shopping list becomes empty