you have been asked by a computer gaming company to create a role-playing game, commonly known as an rpg. the theme of this game will be of the user trying to get a treasure that is being guarded the user will choose a character from a list you create create a character class, in a file named character.h, which will: have the following variables: name race (chosen from a list that you create, like knight, wizard, elf, etc.) weapon (chosen from a list that you create) spells (true meaning has the power to cast spells on others) anything else you want to add the treasure will be hidden in one of the rooms in a castle create a castle class, in a file named castle.h, that will: have these variables: at least four rooms named room1, room2, etc. moat (which is a lagoon surrounding a castle) which boolean (not all castles have them) anything else you want to add create a default constructor for each class that initializes each argument to a blank or false value create a second constructor for each class that assigns arguments passed to it to these variables create the appropriate mutator functions for each class create the appropriate accessor functions for each class in the main program declare all the necessary variables using appropriate data types display a welcome message create two players, using each of the character constructers once create one castle castle using either one of the castle constructors display all of the information for player1 and ask if the information is correct if the answer is 'no', then have the user tell you which item(s) need fixing and give them a chance to re-input the incorrect value do the same thing for player2 and for your castle to control the action of the game, you will use a virtual die that will be 'rolled' roll the die to determine which room in the castle the treasure will be hidden in use random number generator to generate a random number between 1 and 4 (more if you have more than 4 rooms) roll the die to determine who will be guarding the treasure (minimum of 1 to 4; have a different type of character in each room-you decide on the type of character) display the result of the two rolls, ie:  "the treasure is hidden in the dungeon and is being guarded by a wizard." display additional info to the effect that the castle does (or doesn't) have a moat, and the castle gate is guarded by an . In order to enter the castle, the user must answer a question about C++, which you will display, along with the possible answers. if the user answers correctly, display a message that they've defeated the and are inside the castle. then, have the user go to the room where the treasure is hidden, and ask the creature to answer another question about C++. use the random number generator to generate a number between 1 and the number of possible answers (if it's a true/false question, it's 2 possible answers) to 'choose' the answer use a  conditional structure to determine if the character choose the correct answer (ie:  if chose 1 and your program assigns 'true' to that number, and true is the correct answer) if the guard chooses correctly, it has defeated you if the guard chooses incorrectly, you have defeated it display a message telling the user who has been defeated, and ask if they want to play again if yes, send the user back to the beginning of the program if no, say thanks for playing submit all three files  you may add things to your program that are not listed here creativity is encouraged!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
  • you have been asked by a computer gaming company to create a role-playing game, commonly known as an rpg.
  • the theme of this game will be of the user trying to get a treasure that is being guarded
  • the user will choose a character from a list you create
  • create a character class, in a file named character.h, which will:
    • have the following variables:
      • name
      • race (chosen from a list that you create, like knight, wizard, elf, etc.)
      • weapon (chosen from a list that you create)
      • spells (true meaning has the power to cast spells on others)
      • anything else you want to add
  • the treasure will be hidden in one of the rooms in a castle
  • create a castle class, in a file named castle.h, that will:
    • have these variables:
      • at least four rooms named room1, room2, etc.
      • moat (which is a lagoon surrounding a castle) which boolean (not all castles have them)
      • anything else you want to add
  • create a default constructor for each class that initializes each argument to a blank or false value
  • create a second constructor for each class that assigns arguments passed to it to these variables
  • create the appropriate mutator functions for each class
  • create the appropriate accessor functions for each class
  • in the main program
    • declare all the necessary variables using appropriate data types
    • display a welcome message
    • create two players, using each of the character constructers once
    • create one castle castle using either one of the castle constructors
    • display all of the information for player1 and ask if the information is correct
      • if the answer is 'no', then have the user tell you which item(s) need fixing and give them a chance to re-input the incorrect value
      • do the same thing for player2 and for your castle
    • to control the action of the game, you will use a virtual die that will be 'rolled'
      • roll the die to determine which room in the castle the treasure will be hidden in
        • use random number generator to generate a random number between 1 and 4 (more if you have more than 4 rooms)
      • roll the die to determine who will be guarding the treasure (minimum of 1 to 4; have a different type of character in each room-you decide on the type of character)
    • display the result of the two rolls, ie:  "the treasure is hidden in the dungeon and is being guarded by a wizard."
    • display additional info to the effect that the castle does (or doesn't) have a moat, and the castle gate is guarded by an <you decide what character>.
    • In order to enter the castle, the user must answer a question about C++, which you will display, along with the possible answers.
    • if the user answers correctly, display a message that they've defeated the <character> and are inside the castle.
    • then, have the user go to the room where the treasure is hidden, and ask the creature to answer another question about C++.
      • use the random number generator to generate a number between 1 and the number of possible answers (if it's a true/false question, it's 2 possible answers) to 'choose' the answer
      • use a  conditional structure to determine if the character choose the correct answer (ie:  if chose 1 and your program assigns 'true' to that number, and true is the correct answer)
      • if the guard chooses correctly, it has defeated you
      • if the guard chooses incorrectly, you have defeated it
      • display a message telling the user who has been defeated, and ask if they want to play again
        • if yes, send the user back to the beginning of the program
        • if no, say thanks for playing
    • submit all three files 
    • you may add things to your program that are not listed here
    • creativity is encouraged!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY