Updated with support for multiple decks and card repetition