Question
Write a C++ program and algorithm to create a Ghost in a Door Game, where there are 4 doors and a Ghost is in one
Write a C++ program and algorithm to create a “Ghost in a Door Game”, where there are 4 doors and a Ghost is in one of them. The class should also have two players as objects and each of them would choose a door to open. If the player finds the Ghost, the player exits out the game. The game continues if there is no Ghost on opening the door. Till exit for every choice of the door with no Ghost, the player’s score gets updated by 10. Whoever has the highest score wins. The Ghost’s position in one of the four windows is stored in an objectless static variable of the class.
Step by Step Solution
3.54 Rating (158 Votes )
There are 3 Steps involved in it
Step: 1
Three classes are used in the solution Printer class Driver class PrintJobResponse this class is use...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 StartedRecommended Textbook for
Managerial Accounting A Focus on Ethical Decision Making
Authors: Steve Jackson, Roby Sawyers, Greg Jenkins
5th edition
324663854, 978-0324663853
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App