Program in which the user can collect gold while trying to find a way out without being caught by monsters in a maze defined in a matrix.
The player uses the arrow or WASD keys on the keyboard to make moves. The player collects the gold and avoids the monsters. The player only moves on path 0 and the player must move out of the matrix for the game to end.
- In this maze, 1s are considered walls and 0s are considered paths. The program tries to enter from the upper input and exit from the lower output. The starting point of the maze (0,0) is considered.
- The maze size is requested from the user and can be at least 10x10 and maximum 100x100.
- Arrow keys on the keyboard or WASD are used to perform player moves.
- The program works for different mazes.
- There may be a dead end in the maze. However, there be at least one exit in the maze.
- There will be n monsters in different parts of the maze. When the monsters are reached, the game start again.
- There are m pieces of gold in the maze and the collected gold is counted. At the end of the game, the number of collected gold is shown to the user.
- All moves made are saved in a file.