Question
Character Generator (40% Spec) Create a function to run a fantasy character generator!! The goal of this section is to procedurally generate random fictional characters.
Character Generator (40% Spec) Create a function to run a fantasy character generator!! The goal of this section is to procedurally generate random fictional characters. You will generate a random number between 10000 - 99999 From left to right: First Digit If it is even output Good if its odd output Evil Digit 2 & 3 Isolate these and use them to select a name from the file given. Skip the first X-1 lines (where X = the first two digits) and read that name into a C-String 16 Skip 15 lines read and store name Cesar (the 16th name) Digit 4 Determines the characters fantasy race. Use an if-else if-else chain or switch-case to output the characters class name. 0. Human 1. Elf 2. Halfling 3. Gnome 4. Dwarf 5. Half-Elf 6. Kobold 7. Half-Ord 8. Dragon-kin 9. Construct Digit 5 - Determines the class of the character. Use an if-else if-else chain or switch-case to output the characters class name. 0. Barbarian 1. Bard 2. Cleric 3. Druid 4. Fighter 5. Wizard 6. Monk 7. Paladin 8. Ranger 9. Rogue Keep making characters as long as the user demands. Sample Output: Welcome to the Fantasy Character generator! Seed generated 20563: 2 - Good 05 Lenna 6 Kobold 3 Druid Would you like to generate another character? (1 yes, 0 no):
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started