Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

******Please use C++ and comment on the code to help me understand. TY!!!! One Hit Game: We are going to create a quick game that

******Please use C++ and comment on the code to help me understand. TY!!!!

One Hit Game:

We are going to create a quick game that has the following classes: Player

Data:

Health (have it equal 50)

Functions/Methods:

Receive Damage (Player receives 50 damage)

Boss

Data:

Health (have it equal 50)

Functions/Methods:

Player_Attack_1 (does 20 damage to Boss)

Player_Attack_2 (does 30 damage to Boss)

Player_Attack_3 (does 50 Damage to boss)

This is a game where there is one round of fighting between a player and a boss. If the user chooses the right attack, then the Boss dies instantly. If he chooses the wrong attack, then the Boss wins the game.

Set up the game like this:

  • Have some flavor text saying that a Boss has appeared
  • Have the player choose from a list of attacks (they can use numbers or text)
  • Whichever attack the player chooses, have it subtract from the boss's health.
  • If the Boss's health reaches zero from the attack, the player wins
  • Otherwise the Boss gets to attack the player, and win.

You can manipulate this game using loops if you wish, or do it a slightly different way, such as using a rand() to generated the attack, as long as the boss and player can fight and take damage.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

2 The role of built-in stabilizers in dampening business cycles.

Answered: 1 week ago

Question

=+j Describe how EU directives impact IHRM.

Answered: 1 week ago

Question

=+and reduction in force, and intellectual property.

Answered: 1 week ago