Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 players score gets updated by 10. Whoever has the highest score wins. The Ghosts position in one of the four windows is stored in an objectless static variable of the class.

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

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

describe and present a summary of data you have collected.

Answered: 1 week ago

Question

collect, organise and store quantitative data in an effective way;

Answered: 1 week ago