43444546474849505152
} @Override public void reset() { super.reset(); AgentBody b = agentBodyMap.values().iterator().next(); //this is ridiculous removeFromCells(b); grid.getCellAtGridPosition(0, grid.getHeight()-1).addBody(b); b.setLocation(0 + 0.5*grid.getCellWidth(), (grid.getHeight()-1 + 0.5)*grid.getCellHeight()); }
52535455565758596061
} @Override public void init() { super.init(); AgentBody b = agentBodyMap.values().iterator().next(); //this is ridiculous removeFromCells(b); grid.getCellAtGridPosition(0, grid.getHeight()-1).addBody(b); b.setLocation(0 + 0.5*grid.getCellWidth(), (grid.getHeight()-1 + 0.5)*grid.getCellHeight()); }
6263646566676869707172
List<? extends Option> optionPool = makeOptions(); world.setOptionPool(optionPool); agent = makeAgent(optionPool); AgentBody aBody = makeAgentBody(); sim = new Simulator(); sim.setEnvironment(world); world.add(agent, aBody);