Exemple #1
0
    public Fit(PersonStateMachine personMachine) : base(personMachine)
    {
        hygieneStandard    = UIConfigSimulation.hygiene;
        healthStandard     = UIConfigSimulation.health;
        isMasked           = UIConfigSimulation.mask;
        willShakeHand      = UIConfigSimulation.handShake;
        CurrentPersonState = CurrentPersonStates.Fit;
        safetyStandard     = 0;
        safetyStandard    += (isMasked) ? .5f : 0;
        safetyStandard    += (willShakeHand) ? .5f : 0;

        probablityToBeInfected = 1 - (healthStandard + hygieneStandard + safetyStandard) / 3f;
        probablityToInfect     = 0;
    }
 public Recovered(PersonStateMachine personMachine) : base(personMachine)
 {
     CurrentPersonState     = CurrentPersonStates.Recovered;
     probablityToBeInfected = 0;
     probablityToInfect     = 0;
 }
Exemple #3
0
 public Person(PersonStateMachine personMachine)
 {
     this.personStateHandler = personMachine;
 }