示例#1
0
        public void AddDataPoint(int driverNumber, int lapNumber, float speed, float rpm)
        {
            AnalysisDriver driver = GetDriver(driverNumber);
            AnalysisLap    lap    = driver.GetLap(lapNumber);

            lap.AddData(speed, rpm);
        }
示例#2
0
        private AnalysisDriver GetDriver(int driverNumber)
        {
            AnalysisDriver driver = _drivers.Find(d => d.Id == driverNumber);

            if (driver == null)
            {
                driver = new AnalysisDriver()
                {
                    Id = driverNumber
                };
                _drivers.Add(driver);
            }
            return(driver);
        }