Index

ncurses-minesweeper / a58d838

Terminal game of Minesweeper, implemented in C with ncurses.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
3828 Nov 2020 12:53a58d838Update email; Remove LinkedInJosh Stockin112G

Blob @ ncurses-minesweeper / README.md

text/plain2142 bytesdownload raw
1# ncurses Minesweeper
2
3Terminal game of Minesweeper, implemented in C with ncurses.
4
5Minesweeper is a logic game where mines are hidden in a grid of squares. The
6object is to open all the safe squares in the shortest time possible. Use
7the arrow keys to move and \<SPACE\> to select. Read the Help page for more
8information.
9
10Click to watch a video demo on YouTube:
11[![Minesweeper demo](http://img.youtube.com/vi/g7InqPoMShA/maxresdefault.jpg)](http://www.youtube.com/watch?v=g7InqPoMShA "Minesweeper demo")
12
13## Building
14
15Currently functional on all systems with an ncurses library. PDCurses may be
16dropped in and linked on Windows, although this hasn't been tested.
17
18Requirements: `build-essential libncurses-dev`
19
20Compiling and linking:
21```
22make compile build
23```
24
25**Binary executable deposited at `bin/minesweeper`.** You can copy this to
26`/usr/bin/minesweeper` to run the game as `minesweeper` from any location in
27Bash.
28
29If you're contributing source code to this repository, install `clang-format
30clang-tidy` and use `make` to target the linter programs. (`clang-format` is
31a bit finicky; make sure you're running version 10.0.0, or it will yell at you
32about unsupported configuration in `.clang-format`.)
33
34## Program structure
35
36* Entry point at `src/main.c`
37* Rendering logic loop at `src/draw/draw.c`
38* Game logic handler at `src/game/game.c`
39* Game renderer at `src/draw/game.c`
40
41All header files correspond to a similarly named source file except
42`src/draw/pages.h` which encapsulates multiple sources in the same directory.
43
44## TODO
45
46* Rewrite Options screen controls
47* Rewrite game management logic (memory handling, mine count setting)
48
49## Copyright and Licensing
50
51This package is copyrighted by [Joshua 'joshuas3'
52Stockin](https://joshstock.in/) and licensed under the [MIT License](LICENSE).
53
54A form of the following should be present in each source or header file.
55
56```txt
57ncurses-minesweeper Copyright (c) 2020 Joshua 'joshuas3' Stockin
58<https://joshstock.in>
59<https://github.com/JoshuaS3/ncurses-minesweeper>
60This software is licensed under the MIT License.
61```
62
63<<https://joshstock.in>> | josh@joshstock.in | joshuas3#9641
64