Skip to main content

Module koi

Module koi 

Source
Expand description

Reproducible koi development from account observations, independent of rendering.

Structs§

KoiDevelopment
Derived inputs for appearance; source observations remain in the account snapshot.
RecentActivity
Recent activity as of the observation date, as counts rather than judgments.
StreakDevelopment
Weekly streaks: runs of consecutive Monday-Sunday weeks with at least one active day.

Enums§

KoiDevelopmentError
Why a snapshot produced no development. Each message names the repair.
RecentStreak
The most recent streak, still running or ended.

Constants§

ADULT_CONTRIBUTIONS
The adult form: past this total the body keeps lengthening and the fins and tail grow, but the anatomy is settled.
FULL_COLOR_CONTRIBUTIONS
Young koi show their language pigments pale until this total.
MAX_GROWTH_CONTRIBUTIONS
Growth stops here; larger totals keep the maximum form.
YOUNG_SHAPE_CONTRIBUTIONS
Young koi grow into the adult head, eyes, body width, and fins by this total.

Functions§

calculate_growth_fraction
Map total contributions to a growth fraction from zero through one. Gains diminish until MAX_GROWTH_CONTRIBUTIONS; larger totals stay at one. The caller supplies the observed total; elapsed time does not affect growth.
derive_koi_development
Derive one account’s identity, language composition, and contribution development.