Question: Let's create a dungeon! The following features will be created: - Load map - Find start - Game loop - Get command - Escape (quit

Let's create a dungeon! The following features will be created: - Load map - Find start - Game loop - Get command - Escape (quit game) The start position for the player is a cell that contains "S". For example, the Cave map is a 55 grid: S would be the starting position for the player, and F would be the target destination. The available path is presented with * (star) characters. - (dash) is a wall, the player can not go in that direction. What to do First, define the MAP_FILE constant (as in the template below). Continue by implementing the load_map(), find_start(), and get_command() functions. 1. Implement the load_map () function that would load a map from a given text file and return it as a grid (nested list). 2. Implement the find_start () function that takes the map (as a nested list) and finds the starting position of the player on the map. In the example above, the function would return [0,2]. 3. Implement the get_command () function that prompts the user for a command and returns the entered command. 4. Implement the main () function with the following functionality: a) Load data from a text file into a nested list b) Display the nested list (as is, for debugging purposes) c) Find and display the starting position d) Ask the user for a command. If the user enters escape, quit the program. Otherwise, display I do not understand. and ask again. Use the following template. All functions defined in the template must be present and implemented in your code (you may not omit functions). You may add extra functions if needed. Hints
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
