{"id":19430291,"url":"https://github.com/8dcc/minesweeper","last_synced_at":"2026-06-17T17:31:54.246Z","repository":{"id":152864391,"uuid":"617512731","full_name":"8dcc/minesweeper","owner":"8dcc","description":"Simple terminal minesweeper with cursor support made in C","archived":false,"fork":false,"pushed_at":"2023-10-11T23:55:07.000Z","size":73,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T12:14:31.823Z","etag":null,"topics":["c","cli","game","minesweeper","ncurses","vim-keybindings"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/8dcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-22T14:45:48.000Z","updated_at":"2023-07-16T17:41:39.000Z","dependencies_parsed_at":"2023-07-23T07:46:07.937Z","dependency_job_id":null,"html_url":"https://github.com/8dcc/minesweeper","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8dcc%2Fminesweeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8dcc%2Fminesweeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8dcc%2Fminesweeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8dcc%2Fminesweeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/8dcc","download_url":"https://codeload.github.com/8dcc/minesweeper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240612541,"owners_count":19829027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cli","game","minesweeper","ncurses","vim-keybindings"],"created_at":"2024-11-10T14:24:17.532Z","updated_at":"2026-06-17T17:31:49.196Z","avatar_url":"https://github.com/8dcc.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Minesweeper\n**CLI minesweeper made in C using ncurses.**\n\n### Description\nSimple CLI minesweeper with custom resolution (game size), difficulty and\nvim-like movement. It has mouse support (if your terminal supports it and it\nwas compiled with `USE_MOUSE`) and also has color support (if your terminal\nsupports it and it was compiled with `USE_COLOR`).\n\n### Building\nSimply run:\n```console\n$ git clone https://github.com/8dcc/minesweeper\n$ cd minesweeper\n$ make\n...\n```\n\nIf you encounter an error like:\n```console\n$ make\ngcc -Wall -Wextra -o minesweeper.out src/main.c -lncurses -ltinfo\n/bin/ld: cannot find -ltinfo: No such file or directory\ncollect2: error: ld returned 1 exit status\nmake: *** [Makefile:22: minesweeper.out] Error 1\n```\n\nTry removing `-ltinfo` from the linker options:\n```diff\ndiff --git a/Makefile b/Makefile\nindex bc53b0e..c64d41d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,7 +1,7 @@\n\n CC=gcc\n CFLAGS=-Wall -Wextra\n-LDFLAGS=-lncurses -ltinfo\n+LDFLAGS=-lncurses\n BIN=minesweeper.out\n\n .PHONY: clean all run\n```\n\n### Usage\n#### Parameters:\n```console\n$ ./minesweeper.out --help\nUsage:\n    ./minesweeper.out                   - Launch with default resolution\n    ./minesweeper.out --help            - Show this help\n    ./minesweeper.out -h                - Same as --help\n    ./minesweeper.out --keys            - Show the controls\n    ./minesweeper.out -k                - Same as --keys\n    ./minesweeper.out --resolution WxH  - Launch with specified resolution (width, height)\n    ./minesweeper.out -r WxH            - Same as --resolution\n    ./minesweeper.out --difficulty N    - Use specified difficulty from 1 to 100. Default: 40\n    ./minesweeper.out -d N              - Same as --difficulty\n```\n\n#### Keys:\n```console\n$ ./minesweeper.out --keys\nControls:\n    \u003carrows\u003e - Move in the grid\n        hjkl - Move in the grid (vim-like)\n     \u003cspace\u003e - Reveal tile\n    \u003cLMouse\u003e - Reveal clicked bomb\n           f - Flag bomb\n    \u003cRMouse\u003e - Flag clicked bomb\n           r - Reveal all tiles and end game\n           q - Quit the game\n```\n\n#### Characters:\n```\n+--------------------------------------------------+\n|..................................................|\n|..................................................|\n|..................................................|\n|.......................211........................|\n|.......................1 1........................|\n|......................31 1........................|\n|.....................21  1123.....................|\n|..................2221      12....................|\n|..................1          111..................|\n|..................1211         1..................|\n|.....................1  111   12..................|\n|..................2211  1F1 113...................|\n|..................1   123.1 1.....................|\n|..................2   1@..1 11212.................|\n|..................11111...2     2.................|\n|..........................2     2.................|\n|.........................31  1111.................|\n|.........................2   1....................|\n|.........................3   2....................|\n|.........................2   1....................|\n+--------------------------------------------------+\n\n You lost. Press any key to restart.\n\n```\n\n- ` `: Empty tile with no bombs adjacent.\n- `.`: Unknown tile that can be revealed using `\u003cspace\u003e` or flagged using `f`.\n- `F`: Flagged tile that can be unflagged with `f`.\n- `@`: You just revealed a tile with a bomb. You lost.\n- `\u003cnumber\u003e`: Empty tile with *N* adjacent bombs.\n\n### Aditional features\nComment the following line inside [`src/defines.h`](src/defines.h) if you don't\nwant this feature:\n```c\n/*\n * This line adds the \"reveal surrounding\" feature. With this feature, adjacent\n * tiles will get revealed if the user is trying to reveal:\n *   - An already revealed tile\n *   - With adjacent bombs\n *   - With all bombs flagged\n * Comment this line if you don't want this feature.\n */\n#define REVEAL_SURROUNDING\n```\n\nComment the following line inside [`src/defines.h`](src/defines.h) if you don't\nwant color support:\n```c\n/*\n * If you compile the program with USE_COLOR and your terminal supports it, it\n * will render the tiles with color.\n */\n#define USE_COLOR\n```\n\nComment the following line inside [`src/defines.h`](src/defines.h) if you don't\nwant mouse support:\n```c\n/*\n * If you compile the program with USE_MOUSE and your terminal supports it, it\n * will make the tiles clickable.\n */\n#define USE_MOUSE\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8dcc%2Fminesweeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F8dcc%2Fminesweeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8dcc%2Fminesweeper/lists"}