return agent.getPatchVariable(vn);
} catch (org.nlogo.api.AgentException ex) {
throw new EngineException(context, this, ex.getMessage());
}
} else if (agentOrSet instanceof AgentSet) {
AgentSet sourceSet = (AgentSet) agentOrSet;
LogoListBuilder result = new LogoListBuilder();
try {
for (AgentSet.Iterator iter = sourceSet.shufflerator(context.job.random);
iter.hasNext();) {
result.add(iter.next().getPatchVariable(vn));
}
} catch (org.nlogo.api.AgentException ex) {
throw new EngineException(context, this, ex.getMessage());