private void AddCourse(OccupiedTable t) { Course c = t.AddCourse(); Order o; List<Dish> orderedDishes = new List<Dish>(); int i = 0; foreach(Category cat in Restaurant.Categories) foreach(Dish d in cat.Dishes) { if (i % 2 == 0) orderedDishes.Add(d); i++; } for(int j = 0; j < 4; j++) { o = new Order(orderedDishes[j], j + 1); c.Orders.Add(o); } }
public void FreeTable() { this.Occupants = null; this.Occupied = false; }
public void OccupyTable(OccupiedTable o) { this.Occupants = o; this.Occupied = true; }