public Dude getNearestDude(Tile tile) {
		int x = tile.getX();
		int y = tile.getY();
		int bestSquaredDistance = Integer.MAX_VALUE;
		Dude bestStructure = null;

		for (Dude d : allDudes) {
			if(d.getClass() != Dude.class)
				continue;
			if(d.hasTask())
				continue;
			int squaredDistance = (d.getX() - x) * (d.getX() - x) + (d.getY() - y) * (d.getY() - y);
			if (squaredDistance < bestSquaredDistance) {
				if (getLogic().canPath(getTile(d.getX(), d.getY()), tile)) {
					bestSquaredDistance = squaredDistance;
					bestStructure = d;
				}
			}

		}
		return bestStructure;
	}