Added a waiting room and now the checkouts also take the number of people waiting in count for when to open

This commit is contained in:
2023-01-11 16:06:47 +01:00
parent 780f9a8c28
commit a891033a25
5 changed files with 71 additions and 62 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ namespace Caisses
}
public void Tick(GraphicalStore store)
{
if (!Open && store.AverageWaitingTime > GraphicalStore.CROSSOVER_TIME && store.GetEmptyCheckoutCount() == 0 || store.OpenCheckoutCount == 0)
if (!Open && store.AverageWaitingTime > GraphicalStore.CROSSOVER_TIME && store.GetEmptyCheckoutCount() == 0 || store.OpenCheckoutCount == 0 || store.WaitingClients.Count > MAX_CAPACITY * 2 && store.GetEmptyCheckoutCount() == 0)
{
Open = true;
}