private void EvaluateMaximumMinimumCountOfDriver( out DriverStatRecord <int> minF, out DriverStatRecord <int> maxF, out DriverStatRecord <int> minA, out DriverStatRecord <int> maxA) { minF = new DriverStatRecord <int>(int.MaxValue); maxF = new DriverStatRecord <int>(int.MinValue); minA = new DriverStatRecord <int>(int.MaxValue); maxA = new DriverStatRecord <int>(int.MinValue); int val; foreach (Standings.RaceStanding item in this.w.Race.Standings) { val = item.PitInfo.PitCount; if (item.Status == Standings.RaceStanding.eStatus.Running) { if (minF.CompareTo(val) > 0) { minF = new DriverStatRecord <int>(item.Driver, val); } if (maxF.CompareTo(val) < 0) { maxF = new DriverStatRecord <int>(item.Driver, val); } } if (minA.CompareTo(val) > 0) { minA = new DriverStatRecord <int>(item.Driver, val); } if (maxA.CompareTo(val) < 0) { maxA = new DriverStatRecord <int>(item.Driver, val); } } }
private DriverStatRecord <double> GetFastestLapDriver() { DriverStatRecord <double> ret = new DriverStatRecord <double>(null, double.MaxValue); foreach (Standings.RaceStanding item in r.Standings) { if (item.OrderedLaps.Count > 0 && ret.CompareTo(item.OrderedLaps[0].LapTime) > 0) { ret = new DriverStatRecord <double>(item.Driver, item.OrderedLaps[0].LapTime); } } return(ret); }