Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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;
}