Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having trouble coding this in C++ Create a player and fight against computer Both player and computer have the following attribute I username health:

I'm having trouble coding this in C++

image text in transcribedimage text in transcribed

Create a player and fight against computer Both player and computer have the following attribute I username health: 200 power: 100 Both player and computer can do the following jab Hook cross Uppercut guard Opponent's selection Health/Power jab cross Player's selection jab -10/-10 -10/-20 -10/-30 -10/-40 0/35 cross -20/-10 -20/-20 -20/-30 -20/-40 0/30 hook -30/-10 -30/-20 -30/-30 -30/-40 -5/25 uppercut -40/-10 -407-20 -40/-30 -40/-40 - 10/20 Guard 5/-10 5/-20 5/-30 5/-40 10/50 hook uppercut guard Above table presents health and power of user (and computer) at each situation In this game, max health is limited at 500, and max power is limited at 100 If power is below 0, it will get a penalty by skip 1 move and their power will increase by 25 in the next round If health is below 0, this game is over

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

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

How can liver dysfunction cause bleeding disorders?

Answered: 1 week ago