score, initialize core functionality and types

Adds Chrono package

Adds a "Result" type to lib.rs

creates helpful type aliases for Score, Boost, and Gravity.

Creates a "TimedScore" which is a value and time data for calculating
score over time. There are two forms of this, Boosted and Decaying.
Since a Score can either be decaying over time or have been boosted
recently and be kept from decaying for some time.

Also implements a BoostedScore and a DecayingScore, which are both
TimedScores which represent the different states. These are important
because you can't boost a BoostedScore for instance.
This commit is contained in:
Julia Lange 2026-02-05 12:05:43 -08:00
parent 38d1cbbd50
commit a42853ac5a
Signed by: Julia
SSH key fingerprint: SHA256:5DJcfxa5/fKCYn57dcabJa2vN2e6eT0pBerYi5SUbto
4 changed files with 707 additions and 0 deletions

View file

@ -0,0 +1,5 @@
use std::error::Error;
type Result<T> = std::result::Result<T, Box<dyn Error>>;
pub mod score;