Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
1. Assignment Guidance
You will produce, in C, a program which fits the following specifications:
Maze Game
Usage: ./maze <mazefile path>
You are creating a basic game, where players navigate through a maze. Note that we no longer
require passing the maze size as the input arguments.
The maze will be loaded from a file, the filename for which is passed as a command line
argument. Mazes are made up of four characters:
Mazes are made up of four characters:
Character
Purpose
‘#’
A wall which the player cannot move across
‘ ‘ (a space)
A path which the player can move across
‘S’
The place where the player starts the maze
‘E’
The place where the player exits the maze
A maze has a height and a width, with a maximum of 100 and a minimum of 5. Your program will
dynamically allocate an appropriate data structure to store the maze.
The height and width do not have to be equal – as long as both are within the accepted range.
Within a maze, each ‘row’ and ‘column’ should be the same length – the maze should
be a rectangle.When the game loads, the player will start at the starting point ‘S’ and can move through the maze
using WASD movement:
Note: For this assignment, each input will be separated with a newline character – this is not
keypress triggered. This is for the purpose of autograding.
The player can move freely through path spaces (‘ ‘) but cannot move through walls or off
the edge of the map. Some helpful prompts (messages) should be provided if this is
attempted.
The map should NOT be shown to the player every time they make a move (again for the
purpose of autograding), but they can enter‘M’/’m’ to view an image of the map, with their
current location shown by an ‘X’.
When the user reaches the exit point ‘E’, the game is over and will close. The player
should be given some message stating that they have won. There is no ‘lose’ condition.