Exemple #1
0
 static void Main(string[] args)
 {
     Data.Initialize();
     Data.NextRace();
     Visualization.Initialize();
     Visualization.DrawTrack(Data.CurrentRace.Track);
     Data.CurrentRace.Start();
     Data.CurrentRace.RaceFinished += NextRace;
     for (; ;)
     {
         Thread.Sleep(100);
     }
 }
Exemple #2
0
        private static void NextRace(object sender, EventArgs e)
        {
            if (Data.Competition.Tracks.Count > 0)
            {
                Visualization.DrawEndOfRaceScreen();

                //Puur voor mooier maken
                Thread.Sleep(3000);

                Console.Clear();
                Data.CurrentRace.RaceFinished -= NextRace;
                Data.NextRace();
                Visualization.Initialize();
                Visualization.DrawTrack(Data.CurrentRace.Track);
                Data.CurrentRace.RaceFinished += NextRace;
                Data.CurrentRace.Start();
            }
            else
            {
                Visualization.DrawEndOfCompetitionScreen();
            }
        }