I am doing a Hearthstone text game in Java and I'm kinda stuck at choosing the Hero/Rank for the player[x]. I have a Hero
class, which contains a Rank enum {MAGE, PALADIN, PRIEST, etc...}, and I have a Game
class which has access of the Rank
enum with Hero.Rank.VALUE. Also, and this is the important one, I have a TextView class that requests the user to choose the hero class with an int. Thing is, that an int cannot be converted to Rank, and I would like to know an appropriate way to set the player Rank by user input.
I'm using an MVC structure, so it is important to do the Hero Rank request at TextView.