Exemple #1
0
 @Override
 protected void activate() {
   super.activate();
   home();
   randomHeading();
   setColor(
       new Color(
           (int) (Math.random() * 256), (int) (Math.random() * 256), (int) (Math.random() * 256)));
   pheromone = getEnvironment().getPheromone("test", 30, 30);
   pheromone2 = getEnvironment().getPheromone("other", 30, 60);
 }
Exemple #2
0
 @Override
 protected void activate() {
   super.activate();
   home();
   for (int i = 0; i < 2; i++) {
     launchAgent(new PheroEmmiter());
   }
   randomHeading();
   randomLocation();
   setColor(Color.BLUE);
   pheromone = getEnvironment().getPheromone("test", 30, 30);
 }