Skip to content

CSIE-Challenge/Challenge2026-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TUI Minesweeper

Terminal 版踩地雷,使用 Python + Textual。

Run

uv sync
uv run python -m minesweeper.app

Controls

  • Click: reveal cell
  • Right Click: flag / unflag
  • Shift + Click: fallback flag / unflag

Features

  • 8x8 board
  • Random mines
  • First reveal is always safe
  • Flood fill for empty area
  • Win / lose detection
  • In-app game instructions
  • Game result notification

Development

PR 會自動檢查 Python formatting。

本地檢查:

uvx ruff format --check .

自動格式化:

uvx ruff format .

Structure

minesweeper/
├─ app.py
├─ game/
│  ├─ board.py
│  ├─ logic.py
│  └─ state.py
├─ ui/
│  ├─ board_view.py
│  └─ widgets.py
└─ utils/
   └─ helpers.py

About

Challenge 第三次會議 (git) 實作

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages