Пример #1
0
        private void createBeehive_Click(object sender, EventArgs e)
        {
            env = new HiveEnvironment();

            this.createPanel.Visible = true;
            this.Size = new Size(428, 149);
            this.clumpsList.Items.Clear();

            for (int i = 0; i < env.numClumps; i++)
            {
                Rectangle temp = env.clump(i);
                clumpsList.Items.Add("Clump#" + i + "\t" + temp.X + ", " + temp.Y + "\tWidth: " + temp.Width + "\tHeight: " + temp.Height);
            }
            // this.Invalidate();
        }
Пример #2
0
        private void createBeehive_Click(object sender, EventArgs e)
        {
            env = new HiveEnvironment();

            this.createPanel.Visible = true;
            this.Size = new Size(428, 149);
            this.clumpsList.Items.Clear();

            for (int i = 0; i < env.numClumps; i++)
            {
                Rectangle temp = env.clump(i);
                clumpsList.Items.Add("Clump#" + i + "\t" + temp.X + ", " + temp.Y + "\tWidth: " + temp.Width + "\tHeight: " + temp.Height);
            }
               // this.Invalidate();
        }
Пример #3
0
        public BeeHive(int numBees, int Honey, Point Entry, HiveEnvironment environment, Form1 form)
        {
            bees             = new Bee[numBees];
            this.Honey       = Honey;
            this.Entry       = Entry;
            this.environment = environment;
            this.form        = form;
            this.numBees     = numBees;

            rGen  = new Random();
            run   = true;
            isDay = true;

            for (int i = 0; i < numBees; i++)
            {
                bees[i] = new Bee(i, this.rGen, this);
            }
        }
        public BeeHive(int numBees, int Honey, Point Entry, HiveEnvironment environment, Form1 form)
        {
            bees = new Bee[numBees];
            this.Honey = Honey;
            this.Entry = Entry;
            this.environment = environment;
            this.form = form;
            this.numBees = numBees;

            rGen = new Random();
            run = true;
            isDay = true;

            for (int i = 0; i < numBees; i++)
            {
                bees[i] = new Bee(i, this.rGen, this);
            }
        }