Skip to content

A minimalistic, functional Minesweeper implementation in F# for the terminal. No mutable state, pure console gameplay with colored characters.

Notifications You must be signed in to change notification settings

nikvoronin/FineSweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FineSweeper

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).

Interface

finesweeper_console-001

Command-line parameters

finesweeper [width] [height] [mines] [seed]

Arguments

  • 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.

Example runs

finesweeper
finesweeper 10 10 20
finesweeper 15 15 30 54321
finesweeper --help -h /? help

In-Game Commands

  • r X Y (r-Reveal) - Reveal the contents of the cell at column X and row Y.
    • X is a letter representing the horizontal coordinate (column).
    • Y is a number representing the vertical coordinate (row).
  • f X Y (f-Flag) - Place or remove a flag on the cell at column X and row Y to mark a suspected mine.
  • q (q-Quit) - Exit the game immediately.

For example:

|> r a 1
|> f e 3
|> q

How-To Build Release

dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true

About

A minimalistic, functional Minesweeper implementation in F# for the terminal. No mutable state, pure console gameplay with colored characters.

Topics

Resources

Stars

Watchers

Forks

Languages