Ideally mapToPeriodScores should be done in the VM, and the ScoreBox component as a whole should accept ScoreBoxViewState instead of GameData. But if you don't want to refactor all of this right now we don't have to. For now, you could just make toPeriodScores a function on the GameData data class.
Originally posted by @zachseidner1 in #83 (comment)