Open sk-jame opened 7 years ago
unsigned CardRange::charToSuit(char c)
{
switch(c) {
case 's': return 0;
case 'h': return 1;
case 'c': return 2;
case 'd': return 3;
default: return ~0u;
}
}
Actually, you can sort suits how you want and nothing will be changed results will be same =D
Ok, I could create enums by my own, but which order? spade = 0, hearts, clubs, diamonds
or
spade = 0, clubs, hearts, diamonds