public Run(Attempt attempt, IRun splits) { Attempt = attempt; Game = splits.GameName; Category = splits.CategoryName; }
public void UpdateAttemptHistory() { Time time = new Time(); time = (CurrentState.CurrentPhase == TimerPhase.Ended) ? CurrentState.CurrentTime : default(Time); var maxIndex = CurrentState.Run.AttemptHistory.DefaultIfEmpty().Max(x => x.Index); var newIndex = Math.Max(0, maxIndex + 1); var newAttempt = new Attempt(newIndex, time, CurrentState.AttemptStarted, CurrentState.AttemptEnded); CurrentState.Run.AttemptHistory.Add(newAttempt); }
public Run(Attempt attempt, string game, string category) { Attempt = attempt; Game = game; Category = category; }