namespace Koogle.Application.Games.Training; /// /// Game model for Training game type. Stores player statistics. /// public record TrainingGameModel { /// /// Statistics for each player in the game. /// public Dictionary PlayerStatistics { get; init; } = new(); } /// /// Statistics for a single player in a training game. /// public record TrainingPlayerStats { /// /// Total number of throws made. /// public int ThrowCount { get; set; } /// /// Total number of pins have been cleared. /// public int ClearedCount { get; set; } /// /// Total number of pins knocked down. /// public int PinCount { get; set; } /// /// Number of circles (Kranz) scored - 8 outer pins down, center standing. /// public int CircleCount { get; set; } /// /// Number of strikes scored - all 9 pins knocked down. /// public int StrikeCount { get; set; } /// /// Number of gutters (Rinne) - no pins knocked down. /// public int GutterCount { get; set; } /// /// Calculates the average pins per throw. /// public double Average => ThrowCount > 0 ? (double)PinCount / ThrowCount : 0; }