private LapRecord GetLapFromEndWithoutPit(int indexFromBackward) { int lapIndex = base.Laps.Count - PitInfo.PitCount * (indexFromBackward + 1) - 1; if (lapIndex < 0) { return(LapRecord.GetEmpty()); } if (lapIndex >= base.Laps.Count) { return(LapRecord.GetEmpty()); } return(OrderedLaps[lapIndex]); }
public static LapRecord GetLapRecordOrEmpty(LapRecordCollection laps, int index) { if (index < 0) { return(LapRecord.GetEmpty()); } if (laps.Count > index) { return(laps[index]); } else { return(LapRecord.GetEmpty()); } }