static void PizzeriaSimulation(TestUser user, TestPizzeria pizzeria, Pizza order) { user.onMakeOrder += pizzeria.OrderToCook; user.onMakeOrder += pizzeria.DisplayOnScoreboard; pizzeria.onProcessingOrder += user.GetOrder; user.MakeOrder(order); pizzeria.onProcessingOrder -= user.GetOrder; }
static void Main(string[] args) { TestPizzeria testPizzeria = new TestPizzeria("DoDo Pizza"); TestUser testUser = new TestUser("Robby", Guid.NewGuid()); PizzeriaSimulation(testUser, testPizzeria, Pizza.Hawaii); }