Пример #1
0
        public GameInfo(List<WorldObject> worldObjects, Player[] playerList, int ageCounterTarget, GameRuleType gameRuleType)
        {
            AgeCounterTarget = ageCounterTarget;
            GameRuleType = gameRuleType;

            WorldObjects = worldObjects;
            WorldNodes = worldObjects.OfType<Node>().ToList();

            StartingNode = worldObjects.OfType<StartingNode>().First();
            Spinner = worldObjects.OfType<Spinner>().First();
            // Mix in our common world logic with the existing changable logic
            BindedLogicPool = Data.CommonNodeLogic.GetCommonNodeLogic()
                                .Concat(worldObjects.OfType<Node>().Where(i => i.IsChangeable).Select(i => i.BindedLogic)).ToList();

            SetPlayers(playerList);
            CurrentPlayerIndex = -1;
        }
Пример #2
0
        public GameInfo(List <WorldObject> worldObjects, Player[] playerList, int ageCounterTarget, GameRuleType gameRuleType)
        {
            AgeCounterTarget = ageCounterTarget;
            GameRuleType     = gameRuleType;

            WorldObjects = worldObjects;
            WorldNodes   = worldObjects.OfType <Node>().ToList();

            StartingNode = worldObjects.OfType <StartingNode>().First();
            Spinner      = worldObjects.OfType <Spinner>().First();
            // Mix in our common world logic with the existing changable logic
            BindedLogicPool = Data.CommonNodeLogic.GetCommonNodeLogic()
                              .Concat(worldObjects.OfType <Node>().Where(i => i.IsChangeable).Select(i => i.BindedLogic)).ToList();

            SetPlayers(playerList);
            CurrentPlayerIndex = -1;
        }