code: public static boolean go_downstream( int[] colRow, double flowdirection ) {
  
          int n = (int) flowdirection;
          if (n == 10) {
              return true;
          } else if (n < 1 || n > 9) {
              return false;
          } else {
              colRow[1] += DIR[n][0];
              colRow[0] += DIR[n][1];
              return true;
          }
      }
docs: Moves one pixel downstream.
  
  @param colRow
  the array containing the column and row of the current pixel.
  It will be modified here to represent the next downstream
  pixel.
  @param flowdirection
  the current flowdirection number.
  @return true if everything went well.