public World(MessageDelegate messageSender) { bees = new List<Bee>(); flowers = new List<Flower>(); Random random = new Random(); hive = new Hive(this,messageSender); for (int i = 0; i < 10; i++) AddFlower(random); }
public Bee(int id, Point location, World world, Hive hive,MessageDelegate messageSender) { this.ID = id; this.Age = 0; this.location = location; this.InsideHive = true; this.CurrentState = BeeState.Idle; this.destinationFlower = null; this.NectarCollected = 0; this.world = world; this.hive = hive; this.ExState = CurrentState; this.MessageSender += messageSender; }