Exemplo n.º 1
0
 public bool IsEmpty(ref ConnectionLength conLength)
 {
     return(EnterLength >= conLength.Length);
 }
Exemplo n.º 2
0
 public void ClearConnection(ref ConnectionLength conLength)
 {
     EnterLength = conLength.Length;
 }
Exemplo n.º 3
0
 public float NewAgentCoord(ref ConnectionLength conLength)
 {
     return(conLength.Length - EnterLength);
 }
Exemplo n.º 4
0
 public void AgentLeaveThePack(ref Agent agent, ref ConnectionLength conLength)
 {
     ExitLength = math.min(ExitLength + agent.Length, conLength.Length);
 }
Exemplo n.º 5
0
 public bool CouldAgentEnter(ref Agent agent, ref ConnectionLength conLength)
 {
     return(EnterLength >= agent.Length ||           //car fit
            EnterLength >= conLength.Length);                 //car is larger than the road & the road is empty
 }