Question

Create a C++ program that fulfills the requirements of the following prompt: This program will create...

Create a C++ program that fulfills the requirements of the following prompt:

This program will create a text-based squad versus squad battling game. The game will be set up so that two players can play and each player will control a squad. Each member of the squad will have basic and special abilities. When one squad has been fully defeated, that player will be declared the loser. The program will then exit.

The basis of this program will require the use of parallel arrays. You should maintain a set of parallel arrays for each squad. The arrays are as follows:

Squad members’ names

Squad members’ health values

Squad members’ mana values

Squad members’ attack values

Each member of the squad should be able to take the following actions:

Attack

Defend

Special Ability

You will create the special abilities as you see fit. It is okay to allow each squad to have the same special abilities. Each time the player uses a Special Ability, that squad member’s mana should be decremented by some amount. If there isn’t enough mana left to use the ability, the player should be informed and the player should be allowed to choose another action to take. For an example, a special ability might look like this:

A squad member is a cleric. The cleric’s special ability is Heal. When I select Heal, I select a squad member. I then heal that squad member for 10 health points.

Play will proceed like this:

Squad A’s player takes their turn

Player A selects a squad member

Player A selects an action for that squad member

That action is carried out and whatever values should be updated, are

Squad B’s player takes their turn

Player B selects a squad member

Player B selects an action for that squad member

That action is carried out and whatever values should be updated, are

Play then loops back to Squad A’s player

The game is considered “done” when each member of a squad is at 0 heath or less.

Your program should be sectioned up using loops and functions. Specifically, special abilities should be in functions. If you need to pass a value to a function, do so using pointers ONLY (remember, passing an array to a function automatically works like a pointer). You should have appropriate validation when choosing what squad member to use (you shouldn’t be able to use squad members with zero health).

Make your program run automatically without any player needing to make input by using randomization. That means all squad member choices are made by the program and all action choices are made by the program. Play will execute the exact same as outlined above.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

else (Choice 2

Add a comment
Know the answer?
Add Answer to:
Create a C++ program that fulfills the requirements of the following prompt: This program will create...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ Homework: This will be the first in a series of assignments to create a game...

    C++ Homework: This will be the first in a series of assignments to create a game called Zilch. In this assignment, you will create the basic structure of the program and demonstrate the ability to create programs with multiple files. It should serve as a refresher in the basics of C++ programming, especially in the handling of arrays. The initial assignments only establish a rough outline of the game. We will be adding the rules that make the game more...

  • I need to create a Tic Tac Toe program in C++. These are the requirements Write...

    I need to create a Tic Tac Toe program in C++. These are the requirements Write a program that allows the computer to play TicTacToe against a human player or allow two human players to play one another. Implement the following conditions: The player that wins the current game goes first in the next round, and their symbol is X. The other player will be O. Keep track of the number of games played, wins, and draws for each player....

  • Please help with this Intro to programming in C assignment! Intro to Programming in C-Large Program...

    Please help with this Intro to programming in C assignment! Intro to Programming in C-Large Program 3 - Hangman Game Assignment purpose: User defined functions, character arrays, c style string member functions Write an interactive program that will allow a user to play the game of Hangman. You will need to: e You will use four character arrays: o one for the word to be guessed (solution) o one for the word in progress (starword) o one for all of...

  • Use Java language to create this program Write a program that allows two players to play...

    Use Java language to create this program Write a program that allows two players to play a game of tic-tac-toe. Using a two-dimensional array with three rows and three columns as the game board. Each element of the array should be initialized with a number from 1 - 9 (like below): 1 2 3 4 5 6 7 8 9 The program should run a loop that Displays the contents of the board array allows player 1 to select the...

  • C++ Project - Create a memory game in c++ using structs and pointers. For this exercise,...

    C++ Project - Create a memory game in c++ using structs and pointers. For this exercise, you will create a simple version of the Memory Game. You will again be working with multiple functions and arrays. You will be using pointers for your arrays and you must use a struct to store the move and pass it to functions as needed. Program Design You may want to create two different 4x4 arrays. One to store the symbols the player is...

  • C++ program This program involves writing a VERY simplified version of the card game War. You...

    C++ program This program involves writing a VERY simplified version of the card game War. You may know this game or not but my rules are these 1. Split the deck between player1 and player2. Only the face values matter (2-14) and not the suits 2. Each player puts a card down on the table. The higher face value wins that hand. If the card values match, you will simply indicate tie and neither player wins.The original rules would require...

  • Write a c program that will allow two users to play a tic-tac-toe game. You should...

    Write a c program that will allow two users to play a tic-tac-toe game. You should write the program such that two people can play the game without any special instructions. (assue they know how to play the game). Prompt first player(X) to enter their first move. .Then draw the gameboard showing the move. .Prompt the second player(O) to enter their first move. . Then draw the gameboard showing both moves. And so on...through 9 moves. You will need to:...

  • Using C Programming: (use printf, scanf) 18. Tic-Tac-Toc Game Write a program that allows two players...

    Using C Programming: (use printf, scanf) 18. Tic-Tac-Toc Game Write a program that allows two players to play a game of tic-tac-toc. Use a two- dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk (*). The program should run a loop that Displays the contents of the board array Allows player 1 to select a location on the board for an X. The program should...

  • I should use the array and loop to create a java program according to the instruction,...

    I should use the array and loop to create a java program according to the instruction, but I have no idea how to do it. Introduction This lab assignment continues to give you practice using loops, particularly loops with variable termination conditions, and it also provides you an opportunity to use one-dimensional arrays. Recall that an array is used to store a collection of data. The data can be values of Java primitive data types or else objects (for instance,...

  • In this activity you will create a game call Guess That Number! The program has an...

    In this activity you will create a game call Guess That Number! The program has an unlimited number of rounds. In each round the program selects a random number that the user has to guess. In Round 1 the user has to guess a number less than 5 within 5 tries. If the correct number is not guessed in 5 tries than the game is over. If the correct number is guessed than the user moves onto the next round...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT