public void GenerateItems() { Candidates = new ItemList(); for (int i = 0; i < ItemCount; i++) { Candidates.Add(new Item() { Id = i.ToString(), Value = Randomizer.IntInRange(this.ItemValues), Size = Randomizer.IntInRange(this.ItemSizes), }); } }
public CityCollection(IRandomizer randomizer, int count, IntegerRange distanceRange) { for (int i = 0; i < count; i++) { Cities.Add(new City() { Id = i }); } foreach (var city in Cities) { foreach (var otherCities in Cities) { city.Roads.Add(new Road() { City = otherCities, Distance = randomizer.IntInRange(distanceRange) }); } } }