https://github.com/xander180/minesweeper
A minesweeper replica, played in the console. Uses a flood-fill algorithm
https://github.com/xander180/minesweeper
hyperskill intellij-idea kotlin
Last synced: 2 months ago
JSON representation
A minesweeper replica, played in the console. Uses a flood-fill algorithm
- Host: GitHub
- URL: https://github.com/xander180/minesweeper
- Owner: Xander180
- Created: 2023-07-24T14:05:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T14:23:26.000Z (almost 3 years ago)
- Last Synced: 2025-03-05T06:33:27.030Z (over 1 year ago)
- Topics: hyperskill, intellij-idea, kotlin
- Language: Kotlin
- Homepage:
- Size: 4.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Minesweeper
A minesweeper replica played within your computer's console.
Player inputs how many mines they want placed in the field, and player chooses a cell using x and y coordinates, followed by a command (free to free a space and adjacent free spaces, mine to mark a potential mine location)
Program uses a flood-fill algorithm, based on the recursion method (recalling the free space function within itself multiple times to check all 8 directions from the beginning coordinate)
Player wins by finding all the free spaces, or by marking all the mine locations.
Player loses by marking a mine location as free.
To run the program in console, navigate to main program directory within console
Type (or copy/paste):
java -jar Main.jar