{"id":25844468,"url":"https://github.com/azimjohn/minesweeper","last_synced_at":"2025-03-01T07:28:35.341Z","repository":{"id":191381758,"uuid":"375984097","full_name":"azimjohn/minesweeper","owner":"azimjohn","description":"Minesweeper Game - in C++","archived":false,"fork":false,"pushed_at":"2021-10-23T19:32:23.000Z","size":55,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-29T16:41:46.193Z","etag":null,"topics":["cpp","sfml","university-project"],"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/azimjohn.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}},"created_at":"2021-06-11T10:12:25.000Z","updated_at":"2023-08-29T16:41:48.547Z","dependencies_parsed_at":"2023-08-29T16:41:47.190Z","dependency_job_id":null,"html_url":"https://github.com/azimjohn/minesweeper","commit_stats":null,"previous_names":["azimjohn/minesweeper"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azimjohn%2Fminesweeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azimjohn%2Fminesweeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azimjohn%2Fminesweeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azimjohn%2Fminesweeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azimjohn","download_url":"https://codeload.github.com/azimjohn/minesweeper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241334272,"owners_count":19945970,"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","sfml","university-project"],"created_at":"2025-03-01T07:28:34.870Z","updated_at":"2025-03-01T07:28:35.319Z","avatar_url":"https://github.com/azimjohn.png","language":"C++","readme":"# Minesweeper 💣\nMinesweeper Game - in C++\n\n\u003cimg src=\"https://azimjon.com/media/2021/06/14/ezgif-2-b1b4e2f40650.gif\" width=\"540\"\u003e\n\n### Definition of `Cell`\n```cpp\n// cell.h\n\nstruct cell_t {\nprivate:\n    bool is_mine = false;\n    bool is_flagged = false;\n    bool is_revealed = false;\n    int adjacent_mines = 0;\n\npublic:\n    cell_t();\n    ~cell_t();\n    void place_mine();\n    bool reveal();\n    void toggle_flag();\n    void unflag();\n    void increment_adjacent_mines();\n    bool auto_reveal();\n    bool auto_reveal_neighbors();\n    char get_display_value();\n    void reset();\n};\n```\n\n### Definition of `Board`\n```cpp\n// board.h\n\nstruct board_t {\nprivate:\n    int width;\n    int height;\n    cell_t ***cells;\n\npublic:\n    board_t(int W, int H);\n    ~board_t();\n    void reset();\n    void place_mines(int count);\n    void place_mine(unsigned int row, unsigned int col);\n    void reveal_cell(unsigned int row, unsigned int col);\n    void reveal_all_cells();\n    void toggle_flag_cell(unsigned int row, unsigned int col);\n    void draw(sf::RenderWindow* window, TextureManager *textureManager, int cell_size);\n    vector\u003cpair\u003cint, int\u003e \u003e get_adjacent_positions(unsigned int row, unsigned int col);\n};\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazimjohn%2Fminesweeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazimjohn%2Fminesweeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazimjohn%2Fminesweeper/lists"}