A basic ambulance team agent that will try to rescue a given target. Once the target is unburied this agent will attempt to load it and transport it to a refuge. If there is no target then this agent does nothing.
A basic fire brigade agent that will try to extinguish a given target. If the target is a refuge then the fire brigade will attempt to enter the building to replenish water. If there is no target then this agent does nothing.
A basic police force agent that will try to clear a given target. Fully-blocked roads encountered along the way are also cleared. If there is no target then this agent does nothing.
Get the location of the entity controlled by this agent.
@return The location of the entity controlled by this agent.
*/
protectedStandardEntitylocation(){
PoliceForceme=me();
returnme.getPosition(model);
}
@Override
protectedvoidpostConnect(){
super.postConnect();
search=newSampleSearch(model);
}
@Override
publicStringtoString(){
if(me()==null){
return"Human controlled police force";
}
return"Human controlled police force "+getID()+(target==null?" (no target)":" target: road "+target.getID()+" with "+(target.isBlockadesDefined()?" unknown":String.valueOf(target.getBlockades().size()))+" blockades");
}
/**
Get the blockade that is nearest this agent.
@return The EntityID of the nearest blockade, or null if there are no blockades in the agents current location.