public Child() { RandomGenerator rand = new RandomGenerator(); this.gender = rand.RandomGender(); this.name = rand.RandomName(); if (new Random().Next(0, 6) > 2) { this.toy = new Toy(); hasToy = true; } if (hasToy) isBoring = false; }
public Toy() { RandomGenerator rand = new RandomGenerator(); this.color = rand.RandomColor(); this.size = rand.RandomSize(); }