An implementation of the classic Mine Sweeper using 42's minilibx
Firstly, copy the repository into you computer directory
git clone https://github.com/alexpg7/MineSweeper.git MineSweeper && cd MineSweeperOnce copied, just execute the make command
makeWarning
The mlx_linux/configure file can lead to some problems during the compilation.
To solve them, execute
chmod 777 mlx_linux/configureAnd make sure to execute make multiple times until the executable minesweeper is created. (These errors are a minilibx issue, which was not programmed by me)
Execute the program to see the first message. It should output this:
Introduce a number (9-16) to choose grid size. Press enter to continue with default size (9x9):
Introduce a number between 6 and 16 to choose the difficulty.
Once introduced, a window should pop up and the instructions displayed in the terminal:
INSTRUCTIONS:
Left click: unhide cell
Right click: put flag
"R": restart game
You can left-click wherever you prefer to start the game. The first click is always safe!
Keep playing until you win or loose. You can always restart the level by pressing R (be careful!)
Finally, exit the program by clicking the window's cross or interrupting the program with Ctrl+C in the terminal.


