Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

You will be writing a text-based role playing game. The game will include the following:

- A main menu from which the user will choose:

1) See Rules

2) Play Game

3) Quit-

If the user chooses to play the game, menus will be shown from which the user willchoose his/her character and weapon. The course of the game will depend upon theuser's choices.The following menu will be displayed for the user to select a character:

1) Human

2) Ogre

3) ElfNext,

you will display the following menu from which the user will choose a weapon:

1) Flame Thrower

2) Bow and Arrow

3) Magic Potion

- A score will be kept throughout the game based on the user's selections.

You will assign the following point values, but the user will not know these values:Human - 100Ogre - 200Elf - 300If the user chooses Flame Thrower or Bow and Arrow, a practice session will start in whichthe computer will randomly generate a number from 1 - 4, which will determine whattarget is hit.

Assign the following point values:

1 - Target A is hit, worth 100 points2 - Target B is hit, worth 200 points3 - Target C is hit, worth 300 points4 - No target is hit, 0 pointsIf the user chooses Magic, he/she will try to make a potion. The computer will randomlygenerate a number from 0 - 1 to determine if the potion is successful.If the potion is a success, 200 points will be awarded, if it fails, 100 points will be deducted from the score.

- At the end of the game, display the user's score on the screen.

- You will also have a high score file called "highscore.txt" that contains a name and ascore.At the end of the game, read in the score stored in "highscore.txt".

o If the file does not exist, create one with the current player as the high score (name &score)

o If the user has scored higher than the value in the file, replace the value in the text filewith the current player's name and score. Otherwise, do not change the text file.

- The user should be able to play as many times as he/she wishes.Have fun and be creative!!

Notes about Functionality, Implementation & Program Requirements:

1. The program should validate the information entered by the user and display theappropriate error messages.

2. The code should be self-documented, including:

- Descriptive Comment indicating- Author- Program Summary- IPO Chart

- Appropriate comments throughout the code that highlight, among other things, the implementation of the algorithm.

- Adequate use of spaces and indentation so the source code is easy to readwhen printed out.

3. Functional decomposition implementation of the algorithm. Must define at least four different functions. Make sure to include functions that exemplify void vs. return-type,and value vs. reference parameters

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91856718
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in C/C++

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As