public RiverNode calculateNext() {
		double[][] array = instance.array;
		ArrayList<Integer[]> o = getNearbyRegions(array, x, y);
		double min = array[x][y];
		int mX = x, mY = y;
		for (Integer[] i : o)
			if (array[i[0]][i[1]] <= min) {
				min = array[i[0]][i[1]];
				mX = i[0];
				mY = i[1];
			}
		return new RiverNode(mX, mY, instance, null, this);
	}