Question: In the main function, call the read _ file function and store the result in a 2 D list. This is the solution map that
In the main function, call the readfile function and store the result in a D list. This is the
solution map that is hidden from the user and is used to determine if they have found a treasure
or a trap. Create a second D list filled with dots this will be the map that is displayed to
the user and will be updated to show the hints and any treasures that they have found so far.
Create a two item D list for the user that stores the row and column of their location in the maze
and is initialized to the upper left hand corner of the map Use a loop to display the users
map and then prompt the user to move in a direction, to ask for a hint, or to quit the game. Move
the user by calling the moveplayer function and then check to see if they found a treasure or a
trap. If they have found a treasure, then mark a T on the users map and display the number of
treasures remaining. If they have found a trap, then the user loses, and the game ends. If they
find all seven treasures, then the user wins and the game ends. If the user chooses L to look
around get a hint then call counttreasuretraps to get the number of treasures and traps in the
spaces surrounding the players current location. Display the number of treasures and traps to
the user, and then update the users map to display the number of traps that surround that space
unless there is already a T there If the user chooses Q to quit, then the game ends. and do
not update the users location.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
