Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Last active January 15, 2020 16:30
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 IntegerMan/bf1be2aabb9c5817ce90fd5734022873 to your computer and use it in GitHub Desktop.
Save IntegerMan/bf1be2aabb9c5817ce90fd5734022873 to your computer and use it in GitHub Desktop.
public class PastaContext
{
// Initialization not included - would happen at the constructor level as a pass through
public KitchenSupplies Supplies {get;}
public DateTime TimeOfDay {get;}
public IngerdientPriceData PricingData {get;}
}
public PastaMeal BuildPastaMeal(IEnumerable<Guest> guests, PastaContext context)
{
var dinner = new PastaMeal();
// Add a quanity of pasta per guest based on time of day and kitchen supply quantities
// This algorithm will try to prefer cheaper types of pasta
return dinner;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment