ojHighHandValueFunction function

int ojHighHandValueFunction(
  1. HandLevelInterface level,
  2. List<Rank> ranks
)

Default function for assigning a numeric value to the Hand such that lower number equals better hand.

Start with just the level times 10 million. Then within each level, use PositionalHash.u32csr() to express the ranks as an n-digit number in base 16 (which should be less than 10000000). That number will be high for better hands within the level, so we negate it.

Implementation

int ojHighHandValueFunction(HandLevelInterface level, List<Rank> ranks) {
  return 10000000 * level.index - ojhPositional32cr(ranks);
}