コード例 #1
0
ファイル: Display.cs プロジェクト: pushyka/chess-all
        /* Manual partial of the Main Display form.
        This form contains code for creating and updating the
        display and handling inputs from users and sending them
        to the gameController for processing. This constructor
        takes the game controller gc, assigns it to a local reference
        and performs the initialisation of Display elements. */
        public Display(GameController gc)
        {
            this.gameController = gc;
            // triple buffer
            InitializeComponent();
            InitializeOtherComponents();

            tintRef = new List<Control>(); //reset?
            //testc();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: pushyka/chess-all
        static void Main(string[] args)
        {
            GameController gc = new GameController(); // take care of setting up the model etc

            // The Display can can talk to the controller (send it move inputs
            // and when menu is clicked eg)
            // controller provides the display with a restricted view of the model
            // Display may only view Chess.Board
            Application.EnableVisualStyles();
            Application.Run(new Display(gc));
        }