private void ProcessRaceResults()
        {
            //Get Race Best Lap
            var logBestLap = _raceLog.RaceLogLines.OrderBy(t => t.LapTime).FirstOrDefault();

            _raceResults.BestLap = new RaceResultLine {
                PilotCode    = logBestLap.Pilot.Id,
                PilotName    = logBestLap.Pilot.Name,
                RaceDuration = logBestLap.LapTime,
            };

            //Group results by pilot
            var pilotsResults = _raceLog.RaceLogLines.GroupBy(t => t.Pilot.Id);

            foreach (var pilotResult in pilotsResults)
            {
                var raceDurationSum = new TimeSpan(pilotResult.Sum(t => t.LapTime.Ticks));
                var raceDuration    = new TimeSpan(1, 1, raceDurationSum.Minutes, raceDurationSum.Seconds, raceDurationSum.Milliseconds);
                var totalLaps       = pilotResult.Max(t => t.Lap);
                var bestLap         = pilotResult.OrderBy(t => t.LapTime).FirstOrDefault();
                var lapsAvgSpeed    = pilotResult.Average(t => t.LapAvgSpeed);

                var raceResultLine = new RaceResultLine {
                    PilotCode          = pilotResult.FirstOrDefault().Pilot.Id,
                    PilotName          = pilotResult.FirstOrDefault().Pilot.Name,
                    TotalCompletedLaps = totalLaps,
                    RaceDuration       = raceDuration,
                    BestLap            = bestLap.Lap,
                    BestLapTime        = bestLap.LapTime,
                    LapsAvgSpeed       = lapsAvgSpeed
                };
                _raceResults.ResultLines.Add(raceResultLine);
            }
        }
        private void PrintRaceResults()
        {
            Console.WriteLine("-----------------------------------------------------------------------------------------------------");
            Console.WriteLine("Posição |Piloto                 |Voltas |Tempo Prova |Melhor Volta  |Velocidade Média |Diff. Vencedor");
            Console.WriteLine("-----------------------------------------------------------------------------------------------------");
            var            position         = 1;
            RaceResultLine resultLineWinner = null;

            foreach (var resultLine in _raceResults.ResultLines.OrderByDescending(t => t.TotalCompletedLaps).ThenBy(t => t.RaceDuration))
            {
                resultLine.Position = position;
                if (position == 1)
                {
                    resultLineWinner = resultLine;
                }

                resultLine.DiffRaceDurationWinner = (position == 1 ? new TimeSpan(1, 1, 0, 0, 0) : resultLineWinner.RaceDuration.Subtract(resultLine.RaceDuration));

                Console.WriteLine($"" +
                                  $"{resultLine.Position}" +
                                  $"{AddColumnSpace(8, resultLine.Position.ToString())}|" +
                                  $"{resultLine.PilotCode.ToString().PadLeft(3, '0')} - {resultLine.PilotName}" +
                                  $"{AddColumnSpace(23, (resultLine.PilotCode.ToString().PadLeft(3, '0') + " - " + resultLine.PilotName))}|" +
                                  $"{resultLine.TotalCompletedLaps}" +
                                  $"{AddColumnSpace(7, resultLine.TotalCompletedLaps.ToString())}|" +
                                  $"{resultLine.RaceDuration.ToString(@"mm\:ss\:fff")}" +
                                  $"{AddColumnSpace(12, resultLine.RaceDuration.ToString(@"mm\:ss\:fff"))}|" +
                                  $"{resultLine.BestLap} ({resultLine.BestLapTime.ToString(@"mm\:ss\:fff")})" +
                                  $"{AddColumnSpace(10, resultLine.BestLap.ToString(@"mm\:ss\:fff"))}|" +
                                  $"{resultLine.LapsAvgSpeed.ToString("#.###")}" +
                                  $"{AddColumnSpace(17, resultLine.LapsAvgSpeed.ToString("#.###"))}|" +
                                  $"{resultLine.DiffRaceDurationWinner.ToString(@"mm\:ss\:fff")}" +
                                  $"{AddColumnSpace(14, resultLine.DiffRaceDurationWinner.ToString(@"mm\:ss\:fff"))}"
                                  );
                position++;
            }
            Console.WriteLine("-----------------------------------------------------------------------------------------------------");

            Console.WriteLine();
            Console.WriteLine();

            Console.WriteLine("Melhor Volta da Corrida:");
            Console.WriteLine("----------------------------------");
            Console.WriteLine("Piloto                 |Tempo     ");
            Console.WriteLine("----------------------------------");
            Console.WriteLine($"" +
                              $"{_raceResults.BestLap.PilotCode.ToString().PadLeft(3, '0')} - {_raceResults.BestLap.PilotName}" +
                              $"{AddColumnSpace(23, (_raceResults.BestLap.PilotCode.ToString().PadLeft(3, '0') + " - " + _raceResults.BestLap.PilotName))}|" +
                              $"{_raceResults.BestLap.RaceDuration.ToString(@"mm\:ss\:fff")}" +
                              $"{AddColumnSpace(12, _raceResults.BestLap.RaceDuration.ToString(@"mm\:ss\:fff"))}"
                              );
            Console.WriteLine("----------------------------------");
        }