public bool isDone() { foreach (IAgent agent in agents) { if (agent.isAlive()) { return false; } } return true; }