public BalancingGalaxy(Galaxy gal) { this.Stars = new List<BalancingStarSystem>(); this.Warps = new List<WarpLine>(); this.Constellations = new List<Constellation>(); this.Regions = new List<Region>(); this.SpawnStars = new List<BalancingStarSystem>(); foreach (StarSystem star in gal.Stars) { Stars.Add(new BalancingStarSystem(star)); } Stars.ForEach(delegate(BalancingStarSystem balSys) { System.Diagnostics.Debug.WriteLine(balSys.toString()); }); }
public BalancingGalaxy(Galaxy gal) { this.Stars = new List<BalancingStarSystem>(); this.Warps = new List<WarpLine>(); this.Constellations = new List<Constellation>(); this.Regions = new List<Region>(); this.SpawnStars = new List<BalancingStarSystem>(); this.StarCorrespondence = new Dictionary<StarSystem,BalancingStarSystem>(); Players = new List<BalancingPlayer>(); gal.Stars.ForEach((star) => { BalancingStarSystem bstar = new BalancingStarSystem(star); Stars.Add(bstar); StarCorrespondence.Add(star, bstar); }); gal.SpawnStars.ForEach((star) => { BalancingStarSystem bstar = StarCorrespondence[star]; Players.Add(new BalancingPlayer(bstar)); }); Warps = gal.Warps; }
private Balancing(Galaxy gal) { balancingGalaxy = new BalancingGalaxy(gal); }