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; }
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; }