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()); } }
public void WaitingTable() { LookingForDirtyGlas?.Invoke(NumberOfGlasesInTheHand); }