@Autowired
private RealmMap worldMap;
public void handleProgress(Character character) {
MapPoint origin = character.getLocation();
if (origin == null) {
origin = new MapPoint();
origin.x = Utils.getRandomInt(0, Integer.valueOf(Configuration.getValue(ConfigurationKey.MAP_WIDTH)));
origin.y = Utils.getRandomInt(0, Integer.valueOf(Configuration.getValue(ConfigurationKey.MAP_HEIGHT)));
}
MapPoint destination = worldMap.getDestination(origin, RealmMap.MovementDirection.getRandomDirection());
character.setLocation(destination);
LOGGER.debug(character.getName() + " has walked to " + destination.x + ", " + destination.y);
}