Question: For example, to the right is a 4 times 4 labyrinth. We ve marked your starting position with a smiley face and the positions

For example, to the right is a 4\times 4 labyrinth. Weve marked your starting position with a smiley face and the positions of of the three items
with similarly cute emojis. The MazeCell you begin at would have its
north, south, east, and west pointers pointing at the MazeCell objects located one step in each of those directions from you. On the other
hand, the MazeCell containing the book would have its north, east, and
west pointers set to nullptr, and only its south pointer would point
somewhere (specifically, to the cell in the bottom-left corner).
Each MazeCell has a variable named whatsHere that indicates what
item, if any, is at that position. Empty cells will have whatsHere set to
the Item::NOTHING. The cells containing the Spellbook, Potion, or
Wand will have those fields set to Item::SPELLBOOK, Item::POTION,
or Item::WAND, respectively.
If you were to find yourself in this labyrinth, you could walk around a bit to find the items you need to
cast the escape spell. There are many paths you can take; heres three of them:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!