Choosing a Hero
Build the functionality for the player to choose a hero.
After the game lists the heroes, the player must type a number to choose one. Let’s build that functionality. First, we need to generate a question with the numbers that the player can choose, get the player’s input, parse it, and select the corresponding hero. Let’s improve the lib/dungeon_crawl/cli/hero_choice.ex
with the following code:
Get hands-on with 1400+ tech skills courses.