I have a function that finds the first smallest value and returns it from a 2d array:
public static int getMinimumValueOfTerrain(int[][] terrain) { int mi