private Point findClosestEnding(Point start, int rivnum) {
		Point closest = null;
		for (Point p : riverEndings) {
			Tile t = MyzoGEN.getOutput().getTile(p);
			if (t != null && t.riverID != rivnum) {
				if (closest == null) {
					closest = p;
				} else {
					if (Utils.getManhattanDistance(start, p) < Utils.getManhattanDistance(start, closest))
						closest = p;
				}
			}
		}
		
		return closest;
	}