Room descriptions do not have to be wholly verbal. Play a relevant sound when the player enters a particular room. Use play, so that game play can continue while the sound is playing.
Note: This can be any sound in any room so long as its set up to be accessed after someone calls setMediaPath().
```
#This method prints the description for the Entryway
def showEntryway ():
global ghost
creak = makeSound("creak.wav")
play(creak)
printNow("You are in the entry way of the house.")
printNow(" There are cobwebs in the corner.")
printNow("You feel a sense of dread.")
#This section adds a description if the ghost is "in" the room
if ghost == 0:
printNow("You suddenly feel cold.")
printNow("You look up and see a thick mist.")
printNow("It seems to be moaning.")
printNow("Then it disappears.")
#This sets the ghost to be "in" the Kitchen
ghost = 1
printNow("There is a passageway to the north and another to the east.")
printNow("The porch is behind you to the south.")
```
You might also like to view...
Which of the following is a binary tree?
a. Expression tree b. Huffman coding tree c. UNIX file system d. two of the above e. none of (a), (b), and (c)
Inverse lookup
What will be an ideal response?
A(n) ________ measures the amount of movement in any direction so that they can detect shaking or rotation
Fill in the blank(s) with correct word
Every device on the Internet must have a unique IP address
Indicate whether the statement is true or false