예제 #1
0
파일: GameCore.cs 프로젝트: Humple/Chess
        private void ReInitialize()
        {
            runColor = FigureColor.WHITE;
            matrix = new CoreMatrix();
            playWindow = new PlayWindow(this, "Chess", new GuiMatrix(matrix));
            playWindow.FormClosed += new FormClosedEventHandler(PlayWindowClose);

            inviteWindow = new InviteWindow(pCollection);
            inviteWindow.OnChoice += new InviteWindow.OnChoiceEventHandler(InviteWindowMessageReceived);
            inviteWindow.Show();
        }
예제 #2
0
파일: GameCore.cs 프로젝트: Humple/Chess
        public void Initialize()
        {
            matrix = new CoreMatrix();
            playWindow = new PlayWindow(this, "Chess", new GuiMatrix(matrix));
            playWindow.FormClosed += new FormClosedEventHandler(PlayWindowClose);

            PlayerClock = new System.Windows.Forms.Timer();
            PlayerClock.Tick += new EventHandler(PlayerClock_Tick);
            PlayerClock.Interval = 1000;

            inviteWindow = new InviteWindow(pCollection);
            inviteWindow.OnChoice += new InviteWindow.OnChoiceEventHandler(InviteWindowMessageReceived);
            inviteWindow.Show();
            Application.Run();
        }
예제 #3
0
파일: GameCore.cs 프로젝트: Humple/Chess
        //for console game start initialization
        public void Initialize(string ip)
        {
            matrix = new CoreMatrix();
            playWindow = new PlayWindow(this, "Chess", new GuiMatrix(matrix));
            playWindow.FormClosed += new FormClosedEventHandler(PlayWindowClose);

            PlayerClock = new System.Windows.Forms.Timer();
            PlayerClock.Tick += new EventHandler(PlayerClock_Tick);
            PlayerClock.Interval = 1000;

            if (ip == "0.0.0.0")
                StartServer();
            else
                StartClient(ip);

            PlayerClock.Start();
            playWindow.Show();

            Debug.NewMessage("play window show");

            Application.Run();
        }