Exemplo n.º 1
0
 //thread du RankChief
 public void WaiterWorkThread()
 {
     while (true)
     {
         if (ToDoWaiter.Count != 0)
         {
             theDelagate = ToDoWaiter.First().MyFunctionDelegate;
             theDelagate(ToDoWaiter.First().Group);
         }
         Thread.Sleep(1000);
     }
 }
Exemplo n.º 2
0
 public void ServeClient(CustomerGroup group)
 {
     if (group.StateGroup == "waiting")
     {
         Dish dish = group.Order.WaitingDish.First();
         Move("attente", "comptoire");
         Room.Instance.CounterDishes.WaitingDishs.Remove(dish);
         Move("comptoire", "Table des clients");
         Console.WriteLine("Waiter : Voici les " + dish.TypeDish);
         group.CurrentMeal = dish;
         group.Order.WaitingDish.Remove(dish);
         Move("Table client", "attente");
         ToDoWaiter.Remove(ToDoWaiter.First());
         group.StateGroup = "eating";
     }
     else
     {
         Actions toDo = ToDoWaiter.First();
         ToDoWaiter.Remove(toDo);
         ToDoWaiter.Add(toDo);
     }
 }