private static int getResultTypeRank(int lRank, int rRank) {
    for (int rank : RANKS) {
      if (lRank <= rank && rRank <= rank) {
        return rank;
      }
    }
    return 0;
  }
private static int getResultTypeRank(int lRank, int rRank)