{"id":20449131,"url":"https://github.com/glanguage/mines2","last_synced_at":"2026-06-06T17:31:30.012Z","repository":{"id":133842793,"uuid":"241501654","full_name":"GLanguage/Mines2","owner":"GLanguage","description":"A new mine-sweeping game.","archived":false,"fork":false,"pushed_at":"2020-07-31T09:51:01.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T22:26:57.274Z","etag":null,"topics":["cpp","makefile","minesweeper-game"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GLanguage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-19T00:57:41.000Z","updated_at":"2022-02-15T07:24:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e3a784d-fb79-44ee-a7ff-992b033c7766","html_url":"https://github.com/GLanguage/Mines2","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2FMines2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2FMines2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2FMines2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2FMines2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GLanguage","download_url":"https://codeload.github.com/GLanguage/Mines2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241997530,"owners_count":20055118,"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":["cpp","makefile","minesweeper-game"],"created_at":"2024-11-15T10:38:57.876Z","updated_at":"2026-06-06T17:31:29.968Z","avatar_url":"https://github.com/GLanguage.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mines2\n\nA new mine-sweeping game.\n\n## Dependencies\n\n- `g++` (GNU)\n- `make` (GNU) (optional)\n\n## Usage\n\n### Linux / Unix / Mac OS\n\nAfter cloning the repo, `cd` into the `./src` directory, and run\n\n```shell\n$ g++ -c main.cpp\n$ g++ -c game.cpp\n$ g++ -c platform.cpp\n$ g++ -o main main.o game.o platform.o\n```\n\nor (with GNU make)\n\n```shell\n$ make\n```\n\nThen, to start the game, run\n\n```shell\n$ ./main\n```\n\n*NOTE: The process will end automatically after the game is over (you win or lose) . To quit the game befor it is over, press **Ctrl+C**.*\n\nTo uninstall the game, run\n\n```shell\n$ rm main main.o game.o platform.o\n```\n\nor (with GNU make)\n\n```shell\n$ make clean\n```\n\nThe executable file and the object files (`*.o`) will be removed.\n\n### Windows\n\nAfter cloning the repo, `cd` into the `./src` directory, and run\n\n```shell\n$ g++ -c main.cpp\n$ g++ -c game.cpp\n$ g++ -c platform.cpp\n$ g++ -o main.exe main.obj game.obj platform.obj\n```\n\nThen, to start the game, run\n\n```shell\n$ main.exe\n```\n\n*NOTE: The process will end automatically after the game is over (you win or lose) . To quit the game befor it is over, press **Ctrl+C**.*\n\nTo uninstall the game, run\n\n```shell\n$ del main.exe main.obj game.obj platform.obj\n```\n\nThe executable file and the object files (`*.obj`) will be removed.\n\nIf you want to build and/or uninstall the game through GNU make on a Windows OS, replace the commands inside the `./src/makefile` by\n\n```make\nobjs = main.obj game.obj platform.obj\n\nmain.exe : $(objs)\n\tg++ -o main.exe $(objs)\n\nmain.obj : main.cpp game.h\n\tg++ -c main.cpp\ngame.obj : game.cpp game.h platform.h\n\tg++ -c game.cpp\nplatform.obj : platform.cpp platform.h osplatformutil.h\n\tg++ -c platform.cpp\n\n.PHONY : clean\nclean : \n\t-del main.exe $(objs)\n```\n\nThen you can build the game by running\n\n```shell\n$ make\n```\n\nand uninstall it by running\n\n```shell\n$ make clean\n```\n\n### Colorful Mode\n\nColorful Mode, enabled by default, makes the game UI colorful.\n\nTo disable the Colorful Mode, run the game by\n\n```shell\n# Unix-like\n$ ./main --no-color\n\n# Windows\n$ main.exe --no-color\n```\n\n## How to Play\n\n### Beginning\n\nThe game begins with a 9 * 9 map, where the vertical axis is **x** while the horizontal axis is **y**:\n\n```\n \t1\t2\t3\t4\t5\t6\t7\t8\t9\t\n\n1\tN\tN\tN\tN\tN\tN\tN\tN\tN\t\n\n2\tN\tN\tN\tN\tN\tN\tN\tN\tN\t\n\n3\tN\tN\tN\tN\tN\tN\tN\tN\tN\t\n\n4\tN\tN\tN\tN\tN\tN\tN\tN\tN\t\n\n5\tN\tN\tN\tN\tN\tN\tN\tN\tN\t\n\n6\tN\tN\tN\tN\tN\tN\tN\tN\tN\t\n\n7\tN\tN\tN\tN\tN\tN\tN\tN\tN\t\n\n8\tN\tN\tN\tN\tN\tN\tN\tN\tN\t\n\n9\tN\tN\tN\tN\tN\tN\tN\tN\tN\n```\n\nThe map is full of `N`. `N` means that it is *unknown* (aka *Hided*) . Later, `N` may be replaced by\n\n- `#` if it is *marked* (as you think it is a mine)\n- `X` if the mine here *exploded*\n- `[0-9]f?l?` if the position is *shown* and there is/are `[0-9]` mines *around* here (`f` is shown as the *sweep-it-at-first mine* is *around* here; `l` is shown as the *sweep-it-at-last mine* is *around* here)\n- `D` if the mine here has been *swept*\n\n### Checking\n\nFor any *unknown* position P(x, y), if you *believe* it *is not* a mine, you can *check* it (make it *shown*) by entering\n\n```\n0 x y\n```\n\n0 means checking, and x, y show the position of P.\n\nAfter entering, if P is *not* a mine, it will turn to `[0-9]f?l?`, showing the number of mines around P. *Otherwise*, it will turn to `X` and the game will be over (with `YOU LOST. ...` printed) .\n\n### Marking\n\nFor any *unknown* position P(x, y), if you *believe* it *is* a mine, you can *mark* it (to be *swept* later) by entering\n\n```\n1 x y\n```\n\n1 means marking, and x, y show the position of P.  \nAfter entering, P will turn to `#`.\n\nYou can *unmark* P by entering `1 x y` again.\n\n### Sweeping\n\nYou can *sweep* all the *marked* positions by entering\n\n```\n-1\n```\n\nAfter entering, for each one of the *marked* positions, if it *is* a mine, it will turn to `D`. *Otherwise*, it will turn to `[0-9]f?l?` (*shown*) .\n\nIf you swept all the mines, the game will be over (with `... YOU WON! ` printed) .\n\nYou may sweep *more than once* in *a* game in order to sweep all the mines.\n\n*NOTE: After sweeping, the game may be over (you win or lose). For further information, see SIAF \u0026 SIAL.*\n\n### SIAF \u0026 SIAL\n\nThe SIAF (sweep-it-at-first) mine and the SIAL (sweep-it-at-last) mine are the special mines in *Mines2*.\n\nThe SIAF mine *must* be swept at the *first* time you sweep. After each time you sweep, the game will check if the SIAF mine has been swept. If it has *not*, the game will be over (with `YOU LOST. ...` printed) .  \nThe SIAL mine *must* be swept at the *last* time you sweep. After the SIAL mine is swept, the game will check if there are any mines that have *not* been swept yet. If there *are*, the game will be over (with `YOU LOST. ...` printed) .  \nAs a result, the game will definitely be over after the SIAL mine is swept. If you sweep it at the last time, you will win. Otherwise, you will lose.\n\n## Thanks\n\nThank [@itas109](https://github.com/itas109) for providing `./src/osplatformutil.h` ([LINK](https://github.com/itas109/OSPlatformUtil))\n\n## Known Bugs\n\n*NOTE: If you find any bugs, feel free to raise an issue.*\n\n\u003e NONE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglanguage%2Fmines2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglanguage%2Fmines2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglanguage%2Fmines2/lists"}