A lifetime running total, folded in one run at a time - distinct from RunHistory, which
keeps individual runs and may drop the oldest ones once its own limit is reached.
Deriving a lifetime total by reducing over RunHistory.all() would silently undercount the
moment that limit trims anything, so this keeps its own persisted total instead, updated
incrementally by record and never recomputed from a list that can shrink. A game wanting
both a "last 50 runs" list and a true lifetime total uses both classes side by side, each
for the question it actually answers.
A lifetime running total, folded in one run at a time - distinct from
RunHistory, which keeps individual runs and may drop the oldest ones once its ownlimitis reached. Deriving a lifetime total by reducing overRunHistory.all()would silently undercount the moment that limit trims anything, so this keeps its own persisted total instead, updated incrementally byrecordand never recomputed from a list that can shrink. A game wanting both a "last 50 runs" list and a true lifetime total uses both classes side by side, each for the question it actually answers.Example