Sweep mines from a minefield, in the terminal (Bash)

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Post Reply
User avatar
christosangelopoulos
Level 3
Level 3
Posts: 152
Joined: Fri Nov 13, 2020 10:19 pm

Sweep mines from a minefield, in the terminal (Bash)

Post by christosangelopoulos »

https://gitlab.com/christosangel/tui-mines

tui mines is evidently a text-based user interface implimentation of the classic mine sweeping puzzle game.
The user has to clear a board, square by square, flagging the squares suspected to hide mines on the way.
If the user opens a mine square, things go KABOOM! and the game is lost.
The user uses hints from the numbered squares. This numbers how many bombs are touching that square in every direction ( 8 in total).

Through logic, and a bit of luck, the player ends up clearing all the squares, while flagging all the mines.

Image

Image

Image
Post Reply

Return to “Scripts & Bash”