public EraData(EraDetail eraDetail, List <string> factions) { EraDetail = eraDetail; if (factions != null && factions.Any()) { Factions.AddRange(factions); } }
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++; }