Ejemplo n.º 1
0
        public void JoinGame(OthelloPlayerClient player, BattleType battleType)
        {
            player1 = player;
            player2 = new RemotePlayerData()
            {
                Name       = "[DEFAULT]",
                AvatarId   = 15,
                PlayerType = battleType == BattleType.AgainstPlayer ? PlayerType.Human : PlayerType.AI
            };

            player1.SetOrderHandler(this);

            player1.Connect(GameType);
            Thread.Sleep(1000);
            player1.Register();
        }
Ejemplo n.º 2
0
        public void JoinGame(OthelloPlayerClient player1, OthelloPlayerClient player2)
        {
            this.player1        = player1;
            this.player2        = player2;
            duplicatedGameEnded = false;

            player1.SetOrderHandler(this);
            player2.SetOrderHandler(this);

            player1.Connect(GameType);
            player2.Connect(GameType);

            Thread.Sleep(250);

            player1.Register();
            player2.Register();
        }