示例#1
0
        public static void CreateBeesTest(int scoutCount, Site site) 
        {
            scoutBees.Clear();

            Bee.State[] states = { Bee.State.EXPLORING, Bee.State.OBSERVING, Bee.State.RESTING, Bee.State.ASSESSING, Bee.State.DANCING };

            //            R   O   E   A   D
            int[] test = {20, 20, 60, 0, 0};

            for (int i = 0; i < test[0]; i++) {
                Bee newBee = new Bee(Constants.DESTINATION_RADIUS, rand, Bee.State.EXPLORING);
                scoutBees.Add(newBee);
            }
            for (int i = 0; i < test[1]; i++) {
                Bee newBee = new Bee(Constants.DESTINATION_RADIUS, rand, Bee.State.OBSERVING);
                scoutBees.Add(newBee);
            }
            for (int i = 0; i < test[2]; i++) {
                Bee newBee = new Bee(Constants.DESTINATION_RADIUS, rand, Bee.State.RESTING);
                scoutBees.Add(newBee);
            }
            for (int i = 0; i < test[3]; i++) {
                Bee newBee = new Bee(Constants.DESTINATION_RADIUS, rand, Bee.State.ASSESSING);
                newBee.FoundSite(site);
                scoutBees.Add(newBee);
            }
            for (int i = 0; i < test[4]; i++) {
                Bee newBee = new Bee(Constants.DESTINATION_RADIUS, rand, Bee.State.DANCING);
                newBee.setSite(site);
                scoutBees.Add(newBee);
            }

        }
示例#2
0
 internal void setSite(Site site) { memory.Site = site; }
示例#3
0
 /// <summary>
 /// Begin assessment of the site the bee just discovered
 /// </summary>
 /// <param name="s">the site that the bee just discovered</param>
 internal void FoundSite(Site s)
 {
     memory.Site = s;
     memory.Location = s.Point;
     //BeginAssessment();
     ChangeState();
 }