Standard library

cpp file and header file are already done(attached), the only thing left is what’s asked.

Using the standard library, classes

Using the gladiator class attached, we are going to create two armies that will attack each other. This will be accomplished by using the <vector> library

Write a program that performs the following:

  1. Create two vectors of Gladiators, one for the Red team, and one for the Blue team
  2. Show the number of fighters alive on each team
  3. Present the user with the following menu
    1. Take Turn
      1. Randomly select between red team and blue team
      2. Use the first/next fighter on that team to attack a random enemy in the enemy team
        1. Any fighters that get get killed should be removed from the team (With a notification)!
        2. Describe what happened each attack, including which team the attacker is part of.
      3. Repeat this process until all fighters have had a chance to attack.
    2. Add Fighters
      1. Add one fighter to both teams
        1. It would be easier to give fighters a name randomly selected from a list (array) of potential names, than to ask the user for two names every time they want to add more fighters
        2. Show the stats of both fighters as/after they have been added
    3. Exit Program
  4. Return to step 2

 

attached is a set of bug-free gladiator method definitions for you to use.

We will be including it – and the class definition – as separate files in this project.

Menu input should accept either a single lowercase char or an integer, prompts should tell user what to enter.

Points:

1.5 – Documentation, readability, format

1.5 – Filename and Header

2 – Output testing

2 – Proper program flow (conditions, loops, functions, etc)

3 – Proper use of vectors

Header

//Author: (your name)

//CPSC 121 Lab 8

//<MM/DD/YY> (Current Date)