Sorts the cards in a deck