Example #1
0
 private void buttonInitialize_Click(object sender, EventArgs e)
 {
     buttonRun.BackColor = Color.Green;
     GetValuesFromInterface();
     w = new World(Constants.width, Constants.height, Constants.numAnts,
                     Constants.numFoodPiles, Constants.foodPerPile);
     initialized = true;
     Display();
 }
Example #2
0
 public Ant(Affiliance affiliance, World world, Rectangle home)
 {
     this.world = world;
     this.home = home;
     this.dir = (Directions)rand.Next(8);
     this.affiliance = affiliance;
     loc = home;
     hasFood = false;
     enemyAnts = new Ant[Constants.numAnts];
 }