Question: Write a C program street _ fighter.c which allows the user to play a game of Street Fighter. The user should be able to customise

Write a C program street_fighter.c which allows the user to play a game of Street Fighter. The user should be able to customise the attack power and attack key-binding (the assignment of a key on a keyboard to a command) for each fighter.
Each round, the program should prompt each fighter to attack. It should then print out the current health of each fighter, continuing until one of the fighters has no health remaining. At this point it should print which player won the game.
A fighter who is below 50% of their maximum health deals 50% more damage.
You are provided with struct fighter which contains the following fields:
int attack: The attack power of the fighter. A fighter's attack power will come from the user and will be between 1 and 10.
double health: The current health of the fighter. Fighter's begin with a maximum health of 50.
char attack_command: The key binding for the attack command.
 Write a C program street_fighter.c which allows the user to play

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!