{"id":19913538,"url":"https://github.com/stanleyy7/minesweeper","last_synced_at":"2025-03-01T08:44:45.396Z","repository":{"id":143408069,"uuid":"605054704","full_name":"StanleyY7/minesweeper","owner":"StanleyY7","description":"A simplified CLI minesweeper game made using Java. ","archived":false,"fork":false,"pushed_at":"2023-05-19T01:16:31.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T22:49:30.264Z","etag":null,"topics":["command-pattern","java","junit","oop"],"latest_commit_sha":null,"homepage":"","language":"Java","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/StanleyY7.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}},"created_at":"2023-02-22T10:51:08.000Z","updated_at":"2023-05-17T11:40:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"61253d86-074e-4466-b391-0287ec085f80","html_url":"https://github.com/StanleyY7/minesweeper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanleyY7%2Fminesweeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanleyY7%2Fminesweeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanleyY7%2Fminesweeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanleyY7%2Fminesweeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StanleyY7","download_url":"https://codeload.github.com/StanleyY7/minesweeper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241341743,"owners_count":19947105,"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":["command-pattern","java","junit","oop"],"created_at":"2024-11-12T21:33:18.575Z","updated_at":"2025-03-01T08:44:45.374Z","avatar_url":"https://github.com/StanleyY7.png","language":"Java","readme":"# Project: Minesweeper\n\n(I have also refactored this (procedurally) into Go link is: https://github.com/StanleyY7/golangPractice/tree/main/basics/minesweeper I am also working on an OOP refactor into Go)\n\n![minesweeperCap](https://user-images.githubusercontent.com/119549394/221120751-fc4440fb-5ed6-484b-a650-4076c357cb28.PNG)\n\nA simplified CLI minesweeper game made using Java. \n\n## Outline\nThe main aim of this project was to utilise Java to build a simplified minesweeper CLI game.\n\n## MVP\nThe main requirements of this project were:\n\n- To recreate a simplified version of the game Minesweeper to be played in the java console.\n\n- To have the game able to randomly generate 10 mines in a 10x10 grid.\n\n- To have the grid be represented by a 2 dimensional array (or array like structure).\n\n- To enable the user will be able to enter a command that represents a coordinate to check a location for a mine. Whereby after every guess the application should \"redraw\" the 2d grid. Revealing either a number from 0-8 depending on how many mines surround that location (based on the coordinate).\n\n- That if the user selects a mine, the game will respond \"boom!\" and the game will be lost.\n\n- That if every non-mine square has been revealed, the game is won.\n\n- That the grid re-renders to the console after every user command.\n\n## Bonus\n\n- I added J-Unit Testing\n- I refactored my original procedural programming minesweeper code into OOP (refactored version is in \"minesweeperOOP\" folder) whereby I also implemented the Command Design Pattern.\n\n## Summary\nI achieved the above requirements by first implementing the methods one by one in order. As an example I created the grid first, I then made methods to render it,  place bombs and then added more logic/methods accordingly until all MVP requirements were met. I then added bonus features, such as colors for grid elements (i.e. a bomb is red) as well as a wins/losses tracker which is printed at the initial start of the game.\n\n### Gameplay Screenshot\n\n![javaCap](https://user-images.githubusercontent.com/119549394/221120874-9f5e5475-538d-474b-b202-c32eed160cfb.PNG)\n\n### Tech Stack\n- Java\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanleyy7%2Fminesweeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstanleyy7%2Fminesweeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanleyy7%2Fminesweeper/lists"}