public override void InitialiseStatistics() { for (int driverIndex = 0; driverIndex < Data.NumberOfDrivers; driverIndex++) { DriverStats[driverIndex] = new TeammateComparisonDataElement(driverIndex); ComparisonStats[driverIndex] = new TeammateComparisonDataElement(driverIndex); } for (int teamIndex = 0; teamIndex < Data.NumberOfDrivers / 2; teamIndex++) { TeamStats[teamIndex] = new TeammateComparisonDataElement(teamIndex); } }
public override float CompareByPercentage(IStatisticElement element) { TeammateComparisonDataElement other = (TeammateComparisonDataElement)element; return(this.PercentageFinishesAhead - other.PercentageFinishesAhead); }
public override void SetupStatistics() { DriverStats = new TeammateComparisonDataElement[Data.NumberOfDrivers]; TeamStats = new TeammateComparisonDataElement[Data.NumberOfDrivers / 2]; ComparisonStats = new TeammateComparisonDataElement[Data.NumberOfDrivers]; }
public override float CompareByValue(IStatisticElement element) { TeammateComparisonDataElement other = (TeammateComparisonDataElement)element; return(this.finishesAheadOfTeammate - other.finishesAheadOfTeammate); }