Record

@Serializable
data class Record(val wins: Int = 0, val losses: Int = 0, val draws: Int = 0, val streak: Int = 0, val bestStreak: Int = 0, val lossStreak: Int = 0, val worstLossStreak: Int = 0)

Constructors

Link copied to clipboard
constructor(wins: Int = 0, losses: Int = 0, draws: Int = 0, streak: Int = 0, bestStreak: Int = 0, lossStreak: Int = 0, worstLossStreak: Int = 0)

Properties

Link copied to clipboard
Link copied to clipboard
val draws: Int
Link copied to clipboard
val losses: Int
Link copied to clipboard

Current run of consecutive losses.

Link copied to clipboard
val played: Int
Link copied to clipboard
val streak: Int

Current run of consecutive wins.

Link copied to clipboard
Link copied to clipboard
val wins: Int
Link copied to clipboard

Functions

Link copied to clipboard
fun add(outcome: Outcome): Record

A draw ends both kinds of streak.