src/canonical.cpp
// Each street is encoded separately.  Then the codes for each street are
// concatenated into an overall code.  The most significant bits are dedicated
// to the flop, the next significant to the turn, etc., with the least
// significant dedicated to the hole cards.
//
// You can pass in nullptr for raw_hole_cards.
Each street is encoded separately.  Then the codes for each street are
concatenated into an overall code.  The most significant bits are dedicated
to the flop, the next significant to the turn, etc., with the least
significant dedicated to the hole cards.

You can pass in nullptr for raw_hole_cards.
Each street is encoded separately . Then the codes for each street are concatenated into an overall code . The most significant bits are dedicated to the flop the next significant to the turn etc . with the least significant dedicated to the hole cards . You can pass in nullptr for raw_hole_cards .
static unsigned long long int EncodeRanksOfRawSuit(int raw_suit, const Card *raw_board,
						   const Card *raw_hole_cards,
						   int max_street) {
  unsigned long long int code = 0;
  const Card *raw_board_ptr = raw_board;
  for (int st = 1; st <= max_street; ++st) {
    unsigned long long int street_code =
      EncodeRanksOfRawSuitForStreet(raw_suit, st, raw_board_ptr);
    code |= street_code << (16 * (max_street + 1 - st));
    int num_cards_for_street = Game::NumCardsForStreet(st);
    raw_board_ptr += num_cards_for_street;
  }
  if (raw_hole_cards) {
    unsigned long long int street_code =
      EncodeRanksOfRawSuitForStreet(raw_suit, 0, raw_hole_cards);
    code |= street_code;
  }
  return code;
}
static unsigned long long int EncodeRanksOfRawSuit ( int raw_suit , const Card * raw_board , const Card * raw_hole_cards , int max_street ) { unsigned long long int code = 0 ; const Card * raw_board_ptr = raw_board ; for ( int st = 1 ; st <= max_street ; ++ st ) { unsigned long long int street_code = EncodeRanksOfRawSuitForStreet ( raw_suit , st , raw_board_ptr ) ; code |= street_code << ( 16 * ( max_street + 1 - st ) ) ; int num_cards_for_street = Game :: NumCardsForStreet ( st ) ; raw_board_ptr += num_cards_for_street ; } if ( raw_hole_cards ) { unsigned long long int street_code = EncodeRanksOfRawSuitForStreet ( raw_suit , 0 , raw_hole_cards ) ; code |= street_code ; } return code ; }
Each street is encoded separately.
Each street is encoded separately .