Пример #1
0
        private void Test()
        {
            Game g = new Game();
            PropertyBag p = new PropertyBag();
            g.Properties = p;
            g.Owner = -1;

            TurnedGameServerGame tg = new TurnedGameServerGame(g);
            string msg ="";
            CharacterInfo ci1 = new CharacterInfo();
            ci1.ID = 1;
            ci1.CharacterName = "Alpha";
            ServerCharacterInfo t1 = new ServerCharacterInfo(ci1);
            tg.AddPlayer(t1, ref msg);

            CharacterInfo ci2 = new CharacterInfo();
            ci2.ID = 2;
            ci2.CharacterName = "Bravo";
            ServerCharacterInfo t2 = new ServerCharacterInfo(ci2);
            tg.AddPlayer(t2, ref msg);

            CharacterInfo ci3 = new CharacterInfo();
            ci3.ID = 3;
            ci3.CharacterName = "Charly";
            ServerCharacterInfo t3 = new ServerCharacterInfo(ci3);
            tg.AddPlayer(t3, ref msg);

            string msg2 ="";
            tg.StartGame(ref msg2, true);
        }
 protected override GameServerGame OnCreateNewGameServerGame(Game game)
 {
     TurnedGameServerGame g = new TurnedGameServerGame(game);
     game.Decorator = g;
     return g;
 }