This is a very simple game written in C where the player moves through a map, defined by an text file, to collect all the chests and then move to the exit in the fewest number of moves.
Dependencies: https://github.com/codam-coding-college/MLX42 - this should be automatically installed using the Makefile. The readme for this library has details on what dependencies you need depending on the operating system you are running.
It should accept any map that follows the following rules:
- The map must end with a .ber extension
- The map must be rectangular (all the lines must be the same length)
- The map defines walls with a '1', empty space with a '0', and collectibles with a 'C'
- The starting position is defined with a 'P'
- The ending position is defined with a 'E'
- There must be exactly one exit, one start, and at least one collectible.
- There must be a valid path to all collectibles and the exit
- There must be walls all along the four edges of the map
An example of a valid map:
111111111111111
1P000111C000011
10CC00000001111
1001100C0000EC1
10C000111001111
100010CCC000001
111111111111111