Index

ncurses-minesweeper / 680ec04

Terminal game of Minesweeper, implemented in C with ncurses.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
4107 Dec 2020 14:12680ec04Update README.mdJosh Stockin1129G

Blob @ ncurses-minesweeper / README.md

text/plain2347 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## Compiling and Linking
14
15Should be functional on all systems with an ncurses library and `sys/time.h`
16header. PDCurses may be dropped in and linked on Windows, although this hasn't
17been tested. Might work on WSL or Cygwin.
18
19Requirements: `build-essential libncurses-dev`
20
21Compiling and linking:
22```
23make compile build
24```
25
26**Binary executable deposited at `bin/minesweeper`.** You can copy this to
27`/usr/local/bin/minesweeper` to run the game as `minesweeper` from any location
28in your shell (given `/usr/local/bin` is in your path).
29
30If you're contributing source code to this repository, install `clang-format
31clang-tidy` and use `make` to target the linter programs. (`clang-format` is
32a bit finicky; make sure you're running version 10.0.0, or it will yell at you
33about unsupported configuration in `.clang-format`.)
34
35## Program structure
36
37* Entry point at `src/main.c`
38* State structs at `src/state.h`
39* Rendering logic loop at `src/draw/draw.c`
40* Game logic handler (input) at `src/game/game.c`
41* Game renderer at `src/draw/game.c`
42
43All header files correspond to a similarly named source file except
44`src/draw/pages.h`, which encapsulates multiple sources in the same directory,
45and `src/state.h`, which provides struct definitions for game state data.
46
47## TODO
48
49* Rewrite Options screen controls
50* Rewrite game board renderer
51
52## Copyright and Licensing
53
54This package is copyrighted by [Joshua 'joshuas3'
55Stockin](https://joshstock.in/) and licensed under the [MIT License](LICENSE).
56
57A form of the following should be present in each source or header file.
58
59```txt
60ncurses-minesweeper Copyright (c) 2020 Joshua 'joshuas3' Stockin
61<https://joshstock.in>
62<https://github.com/JoshuaS3/ncurses-minesweeper>
63This software is licensed under the MIT License.
64```
65
66&lt;<https://joshstock.in>&gt; | josh@joshstock.in | joshuas3#9641
67