Fixed the waiting time calculation and added graphical representation on the checkouts fill
This commit is contained in:
+3
-19
@@ -22,32 +22,16 @@ namespace Caisses
|
||||
Clients = new List<Client>();
|
||||
Open = false;
|
||||
}
|
||||
public void Tick(int averageWaitingTime, int CrossoverTime)
|
||||
public void Tick(int averageWaitingTime, int CrossoverTime, int openedCheckoutsCount)
|
||||
{
|
||||
if (!Open && averageWaitingTime > CrossoverTime)
|
||||
if (!Open && averageWaitingTime > CrossoverTime || openedCheckoutsCount == 0)
|
||||
{
|
||||
Open = true;
|
||||
}
|
||||
if (Open && averageWaitingTime < CrossoverTime && Clients.Count == 0)
|
||||
if (Open && averageWaitingTime < 1 && Clients.Count == 0 && openedCheckoutsCount > 1)
|
||||
{
|
||||
Open = false;
|
||||
}
|
||||
/*
|
||||
if (Clients.Count != 0)
|
||||
{
|
||||
//This is the first client inline
|
||||
Client client = Clients[0];
|
||||
if (client.State == Client.ClientState.Inline)
|
||||
client.State = Client.ClientState.Checkout;
|
||||
|
||||
|
||||
if (client.CheckoutTime <= 0)
|
||||
{
|
||||
I think we need to do this processing in the store
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user