feat(progression): remaining slice 1 value objects
Lives (floors at zero, exhaustion observable), LevelId, SkillId, PlaythroughId (never self-generates, keeps tests deterministic), StatName enum, LevelTime rejects NaN/infinity. 14 tests. Arithmetic/comparison members deferred to the slices whose behaviour needs them rather than added speculatively.
This commit is contained in:
18
progression/StatName.cs
Normal file
18
progression/StatName.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace Mr.BrickAdventures.Progression;
|
||||
|
||||
/// <summary>
|
||||
/// The closed set of statistics a Profile tracks. Mirrors the five names in the old
|
||||
/// <c>StatNames</c> constants, but as a type, so a typo cannot invent a sixth statistic.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Persisted names live at the persistence seam, not here — the store adapter maps these to and
|
||||
/// from the wire strings and decides what to do with unknown keys from an older save.
|
||||
/// </remarks>
|
||||
public enum StatName
|
||||
{
|
||||
CoinsCollected,
|
||||
EnemiesDefeated,
|
||||
Deaths,
|
||||
LevelsCompleted,
|
||||
ChildrenRescued,
|
||||
}
|
||||
Reference in New Issue
Block a user