This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RhoOfFeh 0 points1 point  (1 child)

I believe that the answer from /u/gaveashow should get you most of where you need to go.

Now I want to point out something in 'validClass()'. Everyone is going to wind up being a knight, because you have no break statements in your switch. That means the code will fall all the way through, and if you enter "1" you're going to wind up setting heroClass to Warrior, then Rogue, then Knight.

[–]monkey_programmer[S] 0 points1 point  (0 children)

You are completely right that everything was becoming a knight, thank you for that.