Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c language assignment Stage 1 0 Add code to validate all user input: Would you like to battle a slime [ y | n ]
c language assignment Stage
Add code to validate all user input:
Would you like to battle a slime yn
Sample output:
Would you like to battle a slime yn p
Please enter either y or n
Would you like to battle a slime yn y
Select an action ar
Sample output:
Select an action ar: z
Please enter either a or r
Select an action ar a
Continue exploring yn
Sample output:
Player has HP remaining. Continue exploring? yn z
Please enter either y or n
Player has HP remaining. Continue exploring? yn nStage
Add code to validate all user input:
Would you like to battle a slime
Sample output:
Would you like to battle a slime yn p
Please enter either or
Would you like to battle a slime y
Select an action ar
Sample output:
Select an action :
Please enter either or
Select an action a
Continue exploring
Sample output:
Player has remaining. Continue exploring? yn z
Please enter either or
Player has HP remaining. Continue exploring? yn n
Stage THIS IS IMPORTANT!
Finally, check the sample output see section titled 'Sample Output' and if necessary, modify your code so
that:
The output produced by your program EXACTLY matches the sample output provided. aside from random
damage values
Your program EXACTLY behaves as described in these specs and the sample output provided.
Stage
Now that you know your code is working why not add code that will allow more randomness between runs. Do this
at the end so you can debug things easily. If you find a bug later on you may want to temporarily remove this
randomness to make the bug easier to fix.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started