}
public void update(Observable o, Object arg) {
String event = (String) arg;
if (event.equals(EventConstants.AGENT_EVENT)) {
Agent agent = (Agent) o;
if (!agent.isAlive()) {
if (agent.getDnaParams().getSpecies() == AgentConstants.TRACER) {
if (agent.getParams().isDuplication()) {
ejectAgents(agent);
}
agent.getWorld().deleteTail(agent);
}
killAgent(agent);
} else if (agent.isDuplicating()) {
agent.setDuplicating(false);
ejectAgents(agent);
}
} else if (event.equals(GUIConstants.PHOTO)) {
takeAPhoto = true;
}