void HIVSimpleDiagnostic::Update( float dt ) { bool cascade_state_ok = UpdateCascade(); if( !cascade_state_ok ) { // the cascadeState must be an abort state return ; } if( firstUpdate ) { result_of_positive_test = positiveTestResult() ; } else { // ------------------------------------------------------------------------------ // --- Count down the time until a positive test result comes back // --- Update() is called the same day as Distribute() so we don't want // --- to decrement the counter until the next day. // ------------------------------------------------------------------------------ days_to_diagnosis -= dt; } ActOnResultsIfTime(); firstUpdate = false; }
void HIVSimpleDiagnostic::Callback( float dt ) { ActOnResultsIfTime(); }