Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C++ to develop the Code. Thanks in advance. Take the following pseudocode and use what we've learned this week to create an adventure game!

Use C++ to develop the Code. Thanks in advance.

image text in transcribed

Take the following pseudocode and use what we've learned this week to create an adventure game! welcome the player set up the game int health = 10, attack, block, turns = 0 seed the random number generator start the loop add 1 to turns start the encounter randomly generate numbers for attack (range = (-4) and block (range = 0-4) if block is greater or equal to attack, successful block otherwise, subtract attack value from health. keep looping while health is greater than zero and fewer than 4 turns have happened if health is greater than 0, congratulate player otherwise, tell the player they're dead. To Submit Once your source code is completed, or when the due date is close, turn in your.cpp file to this assignment page. Do your best to remove any errors, compile and run often to ensure you don't run in to too many errors at once. Beyond the Requirements Beyond effort and polish (some of which is described below), here are some other things you can do to improve your grade: 1. Make the number of turns before the adventure is over random. 2. If the player's health is below a certain number, tell them to go see the doctor. 3. Incorporate sleep() to change the pacing of the game and not have it all come out at once. 4. Send me a link in the comments to your assignment hosted publicly, like on github.com (good for showing off what you know to future employers) 5. Ask the player if they'd like to see all of the numbers used in the game (a debug mode) and if they do, post them at every point they're used

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_2

Step: 3

blur-text-image_3

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

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions