Example #1
0
        public Form1()
        {
            InitializeComponent();
            Worker[] workers = new Worker[4];
            workers[0] = new Worker(new List <Job>()
            {
                new Job("Nectar collector", 10, 100, 5, 10),
                new Job("Honey manufacturing", 1000, 3000, 8, 500)
            },
                                    17);
            workers[1] = new Worker(new List <Job>()
            {
                new Job("Egg care", 1, 5, 25, 2),
                new Job("Baby bee tutoring", 1, 3, 30, 2)
            },
                                    114);
            workers[2] = new Worker(new List <Job>()
            {
                new Job("Hive maintenance", 30, 120, 18, 10),
                new Job("Baby bee tutoring", 2, 5, 34, 2)
            },
                                    149);
            workers[3] = new Worker(new List <Job>()
            {
                new Job("Nectar collector", 30, 200, 32, 15),
                new Job("Honey manufacturing", 2000, 5000, 50, 1000),
                new Job("Egg care", 1, 6, 27, 2),
                new Job("Baby bee tutoring", 1, 5, 33, 2),
                new Job("Hive maintenace", 33, 125, 20, 10)
            },
                                    155);
            Hive h = new Hive(txtNectar, txtHoney);

            txtNectar.Text = h.Nectar.ToString();
            txtHoney.Text  = h.Honey.ToString();
            queen          = new Queen(workers, 275, h);
        }
Example #2
0
 public Queen(Worker[] workers, int weight, Hive hive) : base(weight)
 {
     this.workers = workers;
     this.hive    = hive;
 }