An open API service indexing awesome lists of open source software.

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

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