1 | # ncurses Minesweeper |
2 |
|
3 | Terminal game of Minesweeper, implemented in C with ncurses. |
4 |
|
5 | ## Game |
6 |
|
7 | Minesweeper is a logic game where mines are hidden in a grid of squares. The |
8 | object is to open all the safe squares in the shortest time possible. Use |
9 | \<hjkl\> to move and \<SPACE\> to select. Read the Help page for more information. |
10 |
|
11 | ![Title screen](https://i.imgur.com/HRhl4B2.png) |
12 | ![Ready to start](https://i.imgur.com/HObmgcl.png) |
13 | ![Playing](https://i.imgur.com/7Wx2mbk.png) |
14 | ![Kaboom](https://i.imgur.com/T6bjZVK.png) |
15 | ![Finished game](https://i.imgur.com/8c6zKGl.png) |
16 |
|
17 | ## Installation |
18 |
|
19 | Currently functional on all systems with an ncurses library. PDCurses may be |
20 | dropped in and linked on Windows, although this hasn't been tested. |
21 |
|
22 | Requirements: `coreutils libncurses-dev clang-format clang-tidy` |
23 |
|
24 | Compiling and linking: |
25 | ``` |
26 | make compile build |
27 | ``` |
28 |
|
29 | Binary executable deposited at `bin/minesweeper`. |
30 |
|
31 | ## Source file structure and program flow |
32 |
|
33 | * Entry point at `src/main.c` |
34 | * Rendering logic loop at `src/draw/draw.c` |
35 | * Game logic handler at `src/game/game.c` |
36 | * Game renderer at `src/draw/game.c` |
37 |
|
38 | All header files correspond to a similarly named source file except |
39 | `src/draw/pages.h` which encapsulates multiple sources in the same directory. |
40 |
|
41 | # Copyright and Licensing |
42 |
|
43 | This package is copyrighted by [Joshua 'joshuas3' |
44 | Stockin](https://joshstock.in/) and licensed under the [MIT License](LICENSE). |
45 |
|
46 | A form of the following should be present in each source or header file. |
47 |
|
48 | ```txt |
49 | ncurses-minesweeper Copyright (c) 2020 Joshua 'joshuas3' Stockin |
50 | <https://joshstock.in> |
51 | <https://github.com/JoshuaS3/ncurses-minesweeper> |
52 | This software is licensed under the MIT License. |
53 | ``` |
54 |
|
55 | <<https://joshstock.in>> | joshstockin@gmail.com | joshuas3#9641 | [LinkedIn](https://www.linkedin.com/in/joshstockin/) |
56 |
|