Skip to main content

select_behavior

Function select_behavior 

Source
pub fn select_behavior(koi_development: &KoiDevelopment) -> Behavior
Expand description

Choose the movement for the day after the observation date. A nightly run judges the day that just ended, and the koi shows the result all of the next day. The first matching rule wins:

BehaviorWhen the observation date
Deep restends DEEP_REST_QUIET_DAYS or more quiet days
Restends REST_QUIET_DAYS or more quiet days
Surface feedingis the first day with contributions in its Monday-Sunday week
Dartfalls within seven days of the total crossing a milestone
Dartis a Sunday that finishes a busy week
Cruiseis anything else

A finished week is busy when at most one in ten of the latest DART_COMPARED_WEEKS complete weeks before it match or beat its total, and at least DART_MIN_COMPLETE_WEEKS weeks are compared. So a steady account cruises, and the koi darts at most one day a week beyond milestones. This reads no clock and changes no growth, colors, or marks.