예제 #1
0
        //constructors
        public ClientManager(MainWindow mainWindow)
        {
            intermidiate = new IntermidiateLayer(mainWindow);
            clientThread = new ClientThread(eventRiser);
            clientThread.Protocol = protocol;

            eventRiser.ConfirmEvent += new ClientEventRiser.Confirm(Confirm);
            eventRiser.GetPlayersEvent += new ClientEventRiser.GetPlayers(GetPlayers);
            eventRiser.InviteEvent += new ClientEventRiser.Invite(Invite);
            eventRiser.RejectEvent += new ClientEventRiser.Reject(Reject);
            eventRiser.StartGameEvent += new ClientEventRiser.StartGame(StartGame);
        }
예제 #2
0
        //constructors
        public GameManager(MainPage mainPage)
        {
            intermidiateLayer = new IntermidiateLayer(mainPage);
            gameThread = new GameThread(eventRiser, protocol);

            eventRiser.YourStepEvent += new GameEventRiser.YourStep(YourStep);
            eventRiser.OpponentStepEvent += new GameEventRiser.OpponentStep(OpponentStep);
            eventRiser.ExitEvent += new GameEventRiser.Exit(Exit);
            eventRiser.WinEvent += new GameEventRiser.Win(Win);
            eventRiser.LoseEvent += new GameEventRiser.Lose(Lose);
            eventRiser.ContinueEvent += new GameEventRiser.Continue(Continue);
        }