if (pressed.equals("4") || pressed.equals(ConstantsSimulation.ARROW_KEY_ENCODING_LEFT)) {
newpos.translate(new Vector2D(-1, 0));
env.setAgentPosition(agent.id(), newpos);
}
if (pressed.equals("6") || pressed.equals(ConstantsSimulation.ARROW_KEY_ENCODING_RIGHT)) {
newpos.translate(new Vector2D(1, 0));
env.setAgentPosition(agent.id(), newpos);
}
if (pressed.equals("5") || pressed.equals(ConstantsSimulation.ARROW_KEY_ENCODING_DOWN)) {
newpos.translate(new Vector2D(0, 1));
env.setAgentPosition(agent.id(), newpos);