{"id":36969217,"url":"https://github.com/itabesamesa/minesweeper_4d_rs","last_synced_at":"2026-01-13T21:04:27.778Z","repository":{"id":328854047,"uuid":"1102710252","full_name":"itabesamesa/minesweeper_4d_rs","owner":"itabesamesa","description":"4d minesweeper TUI in rust","archived":false,"fork":false,"pushed_at":"2026-01-12T23:42:06.000Z","size":551,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T03:16:49.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itabesamesa.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-23T23:46:04.000Z","updated_at":"2026-01-10T01:17:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/itabesamesa/minesweeper_4d_rs","commit_stats":null,"previous_names":["itabesamesa/minesweeper_4d_rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itabesamesa/minesweeper_4d_rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itabesamesa%2Fminesweeper_4d_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itabesamesa%2Fminesweeper_4d_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itabesamesa%2Fminesweeper_4d_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itabesamesa%2Fminesweeper_4d_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itabesamesa","download_url":"https://codeload.github.com/itabesamesa/minesweeper_4d_rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itabesamesa%2Fminesweeper_4d_rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-13T21:04:27.189Z","updated_at":"2026-01-13T21:04:27.773Z","avatar_url":"https://github.com/itabesamesa.png","language":"Rust","funding_links":[],"categories":["Table of Contents"],"sub_categories":[],"readme":"# minesweeper_4d\n\nThis is a [Ratatui] app and my 8th minesweeper variant, 7th multidimensional one (assuming all the ones I abandoned where at least supposed to be 4D), 4th public and 2nd (excluding the 3 abandoned ones) 4D one.\n\n[Ratatui]: https://ratatui.rs\n\n![An example game](example_gameplay_v3.png)\n\n\nhttps://github.com/user-attachments/assets/d1e07569-e4ca-4f18-bfa0-eb96f0d7dc50\n\n\n## How to play\n\nYou have to find all the mines in a 4 dimensional field. The pink cursor highlights the current field you're on and its value shows the number of bombs that are around it. To help you find which fields are in the area of influence of the cursor, they are highlighted in a less saturated shade of pink. Have fun finding all the mines!\n\nIn delta mode, each cell displays the amount of not yet flagged mines and 0, if there are covered cells in its area of influence.\n\nIn sweep mode, whenever you flag a mine, it will be removed. Other than that, it is similar to delta mode. When switching to sweep mode, all already flagged mines will be removed. Falsely flagged cells will end the game.\n\nWith marks you can visualise how many mines are in the area of influence. This is not meant to be used as a way to cheese the game, but rather to help one learn new tactics or for a beginner to get a better grasp on how 4D minesweeper works. The order in which you place marks is important! It can get a bit visually crowded when too many marks are placed, so remember to clear them. Marks overriding other marks is intended and should only happen if the amount of cells with that mark isn't fully enclosed by the newly placed mark\n\n\nhttps://github.com/user-attachments/assets/913b4012-a483-4150-baad-a219c09b202e\n\n\nWhen the program is run with `--capture_mouse t`, the cursor will track the mouse, left clicking will uncover a cell and right clicking will flag a cell. When the program crashes with capture_mouse on, you'll have to reset your terminal (this is why it is off by default)\n\nThere is the option of saving your game in a human readable file format. But I haven't tested it extensively. I only added it so that this variant would have every feature of [4d_minesweeper](https://github.com/itabesamesa/4d-minesweeper) in c. Files are saved to your downloads directory by default (run with `-h` and you'll see where that is).\n\nIn theory, this program should be OS agnostic (except for seeds https://docs.rs/rand/latest/rand/rngs/struct.StdRng.html ). But I have never tested this on anything other than Linux...\n\n### Controls\n\n\u003cpre\u003e\n  Quit:                          ctrl+c, q, ESC\n  Controls:                      c\n  Settings:                      o\n  Move left in x:                Leftarrow,  h\n  Move right in x:               Rightarrow, l\n  Move up in y:                  Uparrow,    k\n  Move down in y:                Downarrow,  j\n  Move left in z:                a, ctrl+h\n  Move right in z:               d, ctrl+l\n  Move up in w:                  w, ctrl+k\n  Move down in w:                s, ctrl+j\n  Move to start in x:            shift+Leftarrow,  H\n  Move to end in x:              shift+Rightarrow, L\n  Move to top in y:              shift+Uparrow,    K\n  Move to bottom in y:           shift+Downarrow,  J\n  Move to start in z:            A, alt+h\n  Move to end in z:              D, alt+l\n  Move to top in w:              W, alt+k\n  Move to bottom in w:           S, alt+j\n  Retry game:                    r\n  New game:                      n\n  Find free cell:                f\n  Uncover cell:                  SPACE\n  Give up/reveal field:          g\n  Flag cell:                     m, e\n  Flag cell chording:            M, E\n  Pause game:                    p\n  Toggle info:                   i\n  Toggle delta mode:             u\n  Toggle sweep mode:             U\n  Clear all marks:               ctrl+x\n  Flag obvious marked cells:     alt+x\n  Mark cell:                     x\n  Uncover obvious marked cells:  X\n  Save game:                     ctrl+o\n\u003c/pre\u003e\n\n## Compiling and running\n\n```\ncargo install minesweeper_4d\n```\n\nor\n\nBuild:\n\n```\ncargo build --release\n```\n\nRun:\n\n```\n./target/release/minesweeper_4d\n```\n\n### Commandline arguments\n\n\u003cpre\u003e\n  -h, -?, --help            Show this menu\n  -d, --dim, --dimension    Change field dimensions. An array of unsigned integers e.g.: -d 4 4 4 4\n  -m, --mines               Change amount of mines. An unsigned integer\n  -i, --show_info           Toggle info box. A boolean value t/f or true/false or y/n or yes/no or on/off (any capitalisation)\n  -u, --delta_mode          Toggle delta mode. A boolean value t/f or true/false or y/n or yes/no or on/off (any capitalisation)\n  -U, --sweep_mode          Toggle sweep mode. A boolean value t/f or true/false or y/n or yes/no or on/off (any capitalisation)\n  -s, --seed                Set seed. An unsigned integer\n  -r, --random              Toggle random seed. A boolean value t/f or true/false or y/n or yes/no or on/off (any capitalisation)\n  -c, --capture_mouse       Wether to allow mouse interaction. A boolean value t/f or true/false or y/n or yes/no or on/off (any capitalisation)\n  -o, --dir                 Where to output save files. Default is \"~/Downloads\"\n\u003c/pre\u003e\n\nDefault settings as a command\n\n```\nminesweeper_4d -d 4 4 4 4 -m 20 -i t -u t -U f -r t -c f\n```\n\nClassic Minesweeper as a command... Weirdo...\n\n```\nminesweeper_4d -d 16 16 1 1 -m 40 -i t -u f -U f -r t -c t\n```\n\n## TODO\n\n- [x] Make swapping to and from delta_mode possible\n- [x] Fix 0 showing around newly flagged mines\n- [x] Add timer ~_idk, kinda too lazy..._~\n- [x] Fix win condition\n- [x] ~~Make random seedable~~ hehe, i did it anyway :3\n- [x] Add chording\n- [x] Editable settings\n- [x] Make Controls scrollable _custom implementation instead of ratatui Scrollbar_\n- [ ] Make it possible to win when there are 0 mines\n- [ ] Make game state message part of game instead of field\n\n## License\n\nCopyright (c) itabesamesa/laura418\n\nThis project is licensed under the MIT license ([LICENSE] or \u003chttp://opensource.org/licenses/MIT\u003e)\n\n[LICENSE]: ./LICENSE\n\n## Special thanks\n\nTo Julian Schlüntz for creating [4D Minesweeper](https://store.steampowered.com/app/787980/4D_Minesweeper/) on steam, the original inspiration for this project\n\nTo [Ratatui](https://ratatui.rs) for sparing me from implementing a TUI library from scratch again...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitabesamesa%2Fminesweeper_4d_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitabesamesa%2Fminesweeper_4d_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitabesamesa%2Fminesweeper_4d_rs/lists"}