Skip to main content

Module scores

Module scores 

Source
Expand description

T.B — Tutor high-score persistence.

TutorScores is a thin wrapper around a per-lesson high-score map written to ~/.config/lattice/tutor-scores.toml — the config home on Linux AND macOS (honouring $XDG_CONFIG_HOME), %APPDATA%\lattice\ on Windows. Everything lattice keeps lives under one root; scores used to sit in dirs::data_local_dir(), outside it.

The file is read at do_tutor time so the HUD can show the current high score, and written whenever a lesson is completed or the final lesson is beaten. All I/O errors are logged at debug! and silently swallowed — the game continues without persistence rather than surfacing a confusing error to the user.

Structs§

TutorScores