public static boolean twoConsec(int a, int b, int c) {
  return consec(a, b) ||
      consec(b, c) ||
      consec(a, c);
}

public static boolean consec(int x, int y) {
  return x - y == 1 || x - y == -1;
}

public static boolean consec(int x, int y) {
  return Math.abs(x - y) == 1;
}

