Play Minesweeper inside your terminal.
Make sure to have go downloaded and installed (download here)
First clone the repo
git clone https://github.com/jnarcher/sweeperThen enter the directory and build the executable
cd sweeper && makeThe executable can be found in the target directory.
The following flags can be set to configure the board:
w: width (columns)h: height (rows)b: number of bombs
If no value for the number of bombs is provided, the program will default to 1/6th of the total squares available.
Example:
./sweeper -w 20 -h 20 -b 50This will create a minesweeper game in a grid of 20 columns by 20 rows with 50 bombs.
To move the cursor around the grid you can use the following options for up, left, down, and right respectively:
w, a, s, dh, j, k, l- arrow keys
To mark a bomb with a flag use the enter key.
To reveal a square, use the space bar. Pressing the reveal key on an already revealed square will reveal all surrounding unflagged squares (use with caution).
Press q or ctrl+q to quit at any time.
Sweeper was built using the Bubble Tea TUI framework, which provided the tools to create an intuitive and responsive terminal interface. Special thanks to the Charm team for their excellent framework.
