// /**
// * In this model, we have some big innovations. We have to create policeman
// * and fingerprints and records. All that detail is handled in the lower
// * classes, so the Test.java file doesn't have to be changed.
// */
// import java.lang.Object;
// import java.lang.String;
/**
Test is the class that holds the main() program, the one
that must be run if the java program is to work.
*/
import swarm.Globals;
import swarm.objectbase.Swarm;
import swarm.objectbase.SwarmImpl;
import swarm.activity.Activity;
/**
* Describe class Test
here.
*
* @author Paul E. Johnson
* @version 1.0
*/
public class Test extends Object{
/**
* main
is a required method, all Java programs must
* have it. This main initializes the Swarm system and then
* creates a Model instance called "aModel" and then it puts
* aModel though its paces.
*
* @param args a String[]
value. Used for processing
* command line arguments*/
public static void main (String[] args) {
//initialize many objects that can be used in Swarm programs,
//such as Globals.env.randomGenerator
Globals.env.initSwarm ("StudentsPolice", "1", "pauljohn@ukans.edu", args);
int nOfAgents = 10;
//Constructor needs to give zone to model
Observer anObserver = new Observer (Globals.env.globalZone,nOfAgents);
anObserver.buildObjects ();
anObserver.buildActions (); //Schedules actions
anObserver.activateIn (null); //null because there is no higher context
anObserver.go ();
anObserver.drop ();
System.exit(0);
}
}