@Override
public BufferedImage getSensorView(
PolytrisEnvironment env, PacmanAgent2D agent) {
try {
if (this.nextSensingAgent != PolytrisEnvironment.this.nextAgent) {
currentAgent = new VectorVersionOfAgent(
PolytrisEnvironment.this.nextAgent,
PolytrisEnvironment.this.getParCollection());
this.nextSensingAgent = PolytrisEnvironment.this.nextAgent;
}
return currentAgent.generateImage();