ojhPositional64cs function hashes

int ojhPositional64cs(
  1. Iterable<Card> cards
)

64-bit Positional hash

Implementation

int ojhPositional64cs(Iterable<Card> cards) {
  int max = 10;
  int h = 0;

  for (Card c in cards) {
    max -= 1;
    assert(max >= 0);
    int r = (c.rank == null) ? c.rank!.index : 0;

    h <<= 4;
    h += (0x0F & r);
  }
  return h;
}