jin Otanashi wrote:
The constants of an enum must be valid names. Numbers are not valid names. Just like you can't name a class, variable or method "1" or "2", etc.
Do something like this:
Note: your two enums Value and CardType are not very useful. What happens if you combine them? You get
cards like the 1 of Queens, or the 5 of Jacks?
You'll want to have two enums, one for the
suits (spades, hearts, diamonds, clubs) and one for the ranks (1, 2, 3, ..., 10, Jack, Queen, King, Ace).