Пример #1
0
 public EraData(EraDetail eraDetail, List <string> factions)
 {
     EraDetail = eraDetail;
     if (factions != null && factions.Any())
     {
         Factions.AddRange(factions);
     }
 }
Пример #2
0
        public Game(GameSetup setup)
        {
            if (setup == null)
            {
                throw new ArgumentException("Cannot create game from null setup.");
            }
            if (setup.Factions.Count < 1)
            {
                throw new ArgumentException("Cannot create a game with no factions.");
            }

            Map = new Map(setup.Map);
            Factions.AddRange(setup.Factions.Select(f => new Faction(f, Map)));

            CurrentFactionIndex++;
        }