I have created a class called Deck to represent a deck of playing cards in Python. In it I have made card piles of all cards except with the joker. I am trying to make an inbetween game in which I have to compare the values.
["2C", "3C", "4C", "5C", "6C", "7C", "8C", "9C", "10C", "JC",
"QC", "KC", "AC", "2D", "3D", "4D", "5D", "6D", "7D", "8D",
"9D", "10D", "JD", "QD", "KD", "AD", "2H", "3H", "4H", "5H",
"6H", "7H", "8H", "9H", "10H", "JH", "QH", "KH", "AH", "2S",
"3S", "4S", "5S", "6S", "7S", "8S", "9S", "10S", "JS", "QS",
"KS", "AS"]
This is the list of cards. How do I rank these so that for example, 2C is less than 3C or 4D but same as 2H or 2S?
I wanted to know if I could use OrderedEnum, but at the same time assign same rankings such as for 2C, 2D, 2H, 2S in the process.
I expect that when I use my "Deal" method, I want to be able to compare two cards that were dealt.