Course Solutions Uncategorized (Solved) : C Language 1 Write Program Roll Random Character Declare Enum Different Character Types G Q34228319 . . . .

(Solved) : C Language 1 Write Program Roll Random Character Declare Enum Different Character Types G Q34228319 . . . .

 

..

C++ Language

1. Write a program toroll a random character. Declare an enum with all the differentcharacter types in
your game. Then use the rand()to generate a random number betweenthe min and max values of your
enum (e.g. if you have 4 character classes, then enum values are 0,1, 2, 3). Finally, depending on the type
of character that was randomly selected, generate the rest of thestats, either randomly or hardcoded.

Example Output
Press enter to roll a random character…
Type: Warrior
HP: 93
MP: 1

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post