Question
1. Write a scary, haunted house video game. When a player enters a bedroom the ghostly apparition of a woman in white may appear based
1. Write a scary, haunted house video game. When a player enters a bedroom the ghostly apparition of a woman in white may appear based on a few certain conditions. You may assume the following Boolean variables:
bool hasArrived (True if the player has arrived to the room before.)
bool levelThree (True is the player has made it to level 3.)
bool hasFailed (True if the player has been previously died or been killed in gameplay.)
Write an if-else statement that evaluates whether the apparition will appear in the room for each player based on the following criteria. The ghost will appear if the player arrives in the room, the player has not reached Level 3 and the player has failed at least once in gameplay.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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 Started