Comment on Bleeding edge tech
Hexarei@programming.dev 1 year agoThe cards should just be numbers, and an enum should be used for display names
Comment on Bleeding edge tech
Hexarei@programming.dev 1 year agoThe cards should just be numbers, and an enum should be used for display names
obosob@feddit.uk 1 year ago
Chars are just numbers, but yeah, an enum would work fine too, sure. The only advantage with using a char for it is that there’s no conversion needed for outputting them into strings so it’s a little easier. Less code, very readable, etc. Though yeah, thinking about it JQKA wouldn’t be numerically in the right order which could cause issues if the program did more than just implement HiLo