Categories: Uncategorized

Using StructsThe following program is going to revolve aroun

Using StructsThe following program is going to revolve aroun.
Using StructsThe following program is going to revolve around creating and using the Gladiator struct, which will contain statistics about their performance in combat. Gladiators have some information:Name How they re referenced to the player, provided by the playerMax Health The amount of HP a gladiator will start each fight withCurrent Health The amount of HP a gladiator has left before they have lost the fightEvasion The % chance (0-100) that the gladiator will completely avoid incoming damageCritical The % chance (0-100) that the gladiator will inflict twice the rolled damage when attacking the opponent (known as a crit)Minimum Damage The lowest amount of damage a gladiator can inflict with a successful attackDamage Range The most damage ABOVE Minimum Damage that the gladiator can inflict with a single, non-critical hitWrite a program that performs the following:Tell the user that they are going to be hosting a fight! But first, we need to Prompt the user for a name, which is then sent to the createGladiator(string) functioncreateGladiator should return a gladiator, after randomly generating them according to the following rules:Max Health should be 150, 200, or 250Evasion and Crit should be two independent values chosen from 5, 7.5, 10, 12.5, or 15%You may use numbers like 50 or 75 to represent the percentages for calculations, or alter your randomly generated valuesMinimum Damage should be in the range 8-14, with Damage Range in the range 16-22After stats have been assigned in createGladiator, show the user the stats that were created or loaded using a showStats(gladiator) function, then ask the user if they wish to accept or reject their fighter before the function ends. If they reject the fighter, generate a new set of stats, with the same rules listed under 2.a, under the same name.Repeat step 2 once to obtain the second gladiator for your fightOnce both fighters are obtained, they will take turns (starting with the first fighter) using the takeTurn(gladiator A, gladiator & B) function to attack each other. An attack by fighter A will reduce fighter B s current health by the amount of attack damage. Crits and misses should both be reported. (A and B provided only for illustration purposes)Ask the user if they would like a rematch with the same fighters. If so, go to step 4.Ask the user if they would like to set up another fight. If so, go to step 2.Menu input should accept either a single lowercase char or an integer, prompts should tell user what to enter.Points:2 Documentation, readability, format2 Filename and Header1 Output testing2 Proper program flow (conditions, loops, functions, etc)3 Proper use of structsHeader//Author: Eric May (your name)//CPSC 121 Lab 8//

(Current Date)

Don't use plagiarized sources. Get Your Custom Essay on
Using StructsThe following program is going to revolve aroun
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT!
Order Essay

Using StructsThe following program is going to revolve aroun

superadmin

Recent Posts

What is the easy difination of science | Quick Solution

Science is the pursuit and application of knowledge and understanding of the natural and social…

3 years ago

definition, values, meaning of such values and type of goods with such elasticity value …….. | Quick Solution

Clearly stating the definition, the values, the meaning of such values and the type of…

3 years ago

Acct 422 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago

Acct 322 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago

Macro Economics Question | Quick Solution

https://www.npr.org/sections/ed/2018/04/25/605092520/high-paying-trade-jobs-sit-empty-while-high-school-grads-line-up-for-university Click on the link above. Read the entire link and answer the questions below…

3 years ago

MGT 322 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago