Exemple #1
0
 public void Waitering(Glases glases)
 {
     if (glases.NumberOfEmptyGlases > 0)
     {
         while (glases.NumberOfEmptyGlases > 0)
         {
             glases.NumberOfEmptyGlases--;
             NumberOfGlasesInTheHand++;
         }
         LookingForDirtyGlas?.Invoke(NumberOfGlasesInTheHand);
         Thread.Sleep(wp.getTimeToCollectGlasses());
         while (NumberOfGlasesInTheHand > 0)
         {
             NumberOfGlasesInTheHand--;
             glases.NumberOfGlasesOnShelf++;
         }
         LeavingCleanGlas?.Invoke(0);
         Thread.Sleep(wp.getTimeToWashGlasses());
     }
 }
Exemple #2
0
 public void WaitingTable()
 {
     LookingForDirtyGlas?.Invoke(NumberOfGlasesInTheHand);
 }