Example #1
0
        public Ant(int x, int y, AntHill a)
            : base(x,y)
        {
            hasFood = false;
            status = "";
            anthill = a;

            nearestFood = null;

            current_job = new Job();
        }
Example #2
0
        private void init()
        {
            anthill = new AntHill(0,0);
            anthill2 = new AntHill(width-1, height-1);
            Random joe = new Random();
            for(int i = 0; i < width; i++)
            {
                for(int j = 0; j < height; j++)
                {
                    m_world[i,j] = '_';
                }
            }

            for(int i = 0; i < num_food; i++)
            {
                foodz.Add(new Food(joe.Next()%width, joe.Next()%height));
            }
        }