public CGarage CreateGarage(CGarage garage) { var i = 0; Console.WriteLine("\n\n"); while (i <= garage.Inv.Length - 1) { CCar car = new CCar(); Console.Clear(); string tmpI = Convert.ToString(i + 1); Console.WriteLine("Car {0}", tmpI); Console.WriteLine("\nBrand: "); String brand = Convert.ToString(Console.ReadLine()); car.Brand = brand; Console.WriteLine("\nModel: "); String name = Convert.ToString(Console.ReadLine()); car.Name = name; Console.WriteLine("\nZero to Hundred Kilometres-Time: "); Double zth = Convert.ToDouble(Console.ReadLine()); car.Zth = zth; garage.Inv[i] = car; i++; } return(garage); }
public void WinnerScreen(CCar winner) { Console.BackgroundColor = ConsoleColor.Cyan; Console.Clear(); Console.ForegroundColor = ConsoleColor.Black; Console.WriteLine("\n\n"); DrawCar(); Console.WriteLine("\n\n{0} {1} won!\n\nPress any key to continue...", winner.Brand, winner.Name); Console.ReadKey(); }