A classic Minesweeper game for the terminal, built with Dart and nocterm.
███╗ ███╗██╗███╗ ██╗███████╗███████╗
████╗ ████║██║████╗ ██║██╔════╝██╔════╝
██╔████╔██║██║██╔██╗ ██║█████╗ ███████╗
██║╚██╔╝██║██║██║╚██╗██║██╔══╝ ╚════██║
██║ ╚═╝ ██║██║██║ ╚████║███████╗███████║
╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝
-
Terminal-based UI with keyboard controls
-
Three difficulty levels:
Difficulty Grid Size Mine Density Easy 9×9 12% Medium 16×16 24% Hard 24×24 36% -
Animated game over sequence
-
Flag system to mark suspected mines
- Dart SDK
>=3.9.0 <4.0.0
dart pub getdart run| Key | Action |
|---|---|
| Arrow Keys | Move cursor |
| Space | Reveal cell |
| F | Flag/unflag cell |
| Enter | Confirm selection |
- Select a difficulty level on the intro screen
- Navigate the grid using arrow keys
- Press Space to reveal a cell
- Press F to flag cells you suspect contain mines
- Reveal all non-mine cells to win
- Hit a mine and it's game over!
lib/
├── main.dart # Entry point
└── src/
├── app.dart # Root application component
├── models/ # Data models (Difficulty, Place, etc.)
├── provider/ # State management
└── screens/
├── intro/ # Difficulty selection screen
├── mine_sweeper/ # Main game screen
└── game_over/ # Game over screen
- nocterm – Terminal UI framework
- scoped_deps – Dependency injection
- file – File system abstraction