CardSet pokerstove::canonizeToBoard(const CardSet& board, const CardSet& hand) { CardSet cboard = board.canonize(); vector<int> perms = findSuitPermutation(board, cboard); CardSet chand = hand.rotateSuits(perms[0],perms[1],perms[2],perms[3]); return chand; }
CardSet CardSet::canonize(const CardSet& other) const { CardSet cother = other.canonize(); vector<int> perms = findSuitPermutation(other, cother); CardSet hand = *this; CardSet chand = hand.rotateSuits(perms[0],perms[1],perms[2],perms[3]); return chand; }