Answered step by step
Verified Expert Solution
Link Copied!

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 10
Add code to validate all user input:
Would you like to battle a slime [y|n]?
Sample output:
Would you like to battle a slime [y|n]? p
Please enter either 'y' or 'n'.
Would you like to battle a slime [y|n]? y
Select an action [a|r]?
Sample output:
Select an action [a|r]: z
Please enter either 'a' or 'r'.
Select an action [a|r] a
Continue exploring [y|n]?
Sample output:
Player has 148 HP remaining. Continue exploring? [y|n]? z
Please enter either 'y' or 'n'.
Player has 148 HP remaining. Continue exploring? [y|n]? nStage 10
Add code to validate all user input:
Would you like to battle a slime y|n?
Sample output:
Would you like to battle a slime (y|n)? p
Please enter either 'y' or 'n'.
Would you like to battle a slime [y|n]? y
Select an action [a|r]?
Sample output:
Select an action [a|r]:z
Please enter either 'a' or 'r'.
Select an action a|x a
Continue exploring [y|n]?
Sample output:
Player has 148HP remaining. Continue exploring? [y|n]? z
Please enter either 'y' or 'n'.
Player has 148 HP remaining. Continue exploring? [y|n]? n
Stage 11- 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 12
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.
image text in transcribed

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions