Question: EXERCISE ( O ) ) : Street Fighter Copy the program street _ fighter.c from the course account to your directory by typing ( make
EXERCISE O:
Street Fighter
Copy the program streetfighter.c from the course account to your directory by typing make sure you type the
dot at the end:
$ cp dppublichtmlTactivitiesstreetfighterstreetfighter.c
The program should allow the user to play a game of Street Fighter. The user should be able to customise the attack
power and attack keybinding 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 of their maximum health deals more damage.
You are provided with
which contains the following fields:
: The attack power of the fighter. A fighter attack power will come from the user and will be between
and
double health : The current health of the fighter. Fighter begin with a maximum health of
char attackcommand : The key binding for the attack command. Please help! I need to code struct with it but It won't working idk why.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
