2022 - Program

From TRCCompSci - AQA Computer Science
Jump to: navigation, search

The Code

    class Program
    {
        static void Main(string[] args)
        {
            Breakthrough ThisGame = new Breakthrough();
            ThisGame.PlayGame();
            Console.ReadLine();
        }
    }

Explanation

By default, when a C# program is run this will be the code to be executed first (ie the 'static void Main' in the class of program).

This creates a new instance of 'Breakthrough' called 'ThisGame'.

The 'PlayGame' method of object 'ThisGame' is then called.