pub fn select_behavior(koi_development: &KoiDevelopment) -> BehaviorExpand 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:
| Behavior | When the observation date |
|---|---|
| Deep rest | ends DEEP_REST_QUIET_DAYS or more quiet days |
| Rest | ends REST_QUIET_DAYS or more quiet days |
| Surface feeding | is the first day with contributions in its Monday-Sunday week |
| Dart | falls within seven days of the total crossing a milestone |
| Dart | is a Sunday that finishes a busy week |
| Cruise | is 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.