A minimalistic, functional Minesweeper implementation in F# for the terminal. No mutable state, pure console gameplay with colored characters.
>
┏━┛┛┏━ ┏━┛┏━┛┃┃┃┏━┛┏━┛┏━┃┏━┛┏━┃
┏━┛┃┃ ┃┏━┛━━┃┃┃┃┏━┛┏━┛┏━┛┏━┛┏┏┛
┛ ┛┛ ┛━━┛━━┛━━┛━━┛━━┛┛ ━━┛┛ ┛
System requirements: Windows 10 x64, .NET Desktop Runtime 10.0.
Linux and macOS are also supported with the corresponding .NET runtime.
ℹ️ For the best experience, use a modern UTF-8 terminal with emoji support, such as Windows Terminal (wt).
finesweeper [width] [height] [mines] [seed]
- width - board width [3..26] default 12
- height - board height [3..26] default 12
- mines - number of mines [3..99] default 10
- seed - optional random seed (signed integer)
ℹ️ The board will be the same for the same seed value.
finesweeper
finesweeper 10 10 20
finesweeper 15 15 30 54321
finesweeper --help -h /? helprX Y (r-Reveal) - Reveal the contents of the cell at columnXand rowY.Xis a letter representing the horizontal coordinate (column).Yis a number representing the vertical coordinate (row).
fX Y (f-Flag) - Place or remove a flag on the cell at columnXand rowYto mark a suspected mine.q(q-Quit) - Exit the game immediately.
For example:
|> r a 1
|> f e 3
|> qdotnet publish -c Release -r win-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true