A collection of classic mini games built with Python and Libadwaita (GTK4).
使用 Python 和 Libadwaita (GTK4) 构建的经典迷你游戏集合。
Show screenshots / 展开截图
Coming soon...
| Game | 游戏 | Description |
|---|---|---|
| 2048 | 2048 | Slide tiles to combine and reach 2048 |
| Minesweeper | 扫雷 | Classic mine-finding puzzle game |
| Tetris | 俄罗斯方块 | Stack falling blocks to clear lines |
| Snake | 贪吃蛇 | Guide the snake to eat and grow |
| Chess | 国际象棋 | Classic chess game with AI opponent (3 difficulty levels) |
| Chinese Chess | 中国象棋 | Traditional Chinese chess (Xiangqi) with AI opponent |
| Tic-Tac-Toe | 井字棋 | Simple three-in-a-row game with AI opponent |
- Modern GNOME/Libadwaita UI design / 现代 GNOME/Libadwaita 界面设计
- Bilingual support (English/Chinese) / 双语支持(中文/英文)
- Score tracking and history / 分数记录和历史
- Frequently played games section / 常玩游戏显示
- Keyboard and gesture controls / 键盘和手势控制
- AI opponents with multiple difficulty levels / 多难度AI对手
- Smooth piece movement animations (Chess games) / 流畅的棋子移动动画(象棋游戏)
- Undo functionality / 悔棋功能
- Python 3.x
- GTK 4.0
- Libadwaita 1.x
- PyGObject
sudo dnf install python3 python3-gobject gtk4 libadwaitasudo apt install python3 python3-gi gir1.2-gtk-4.0 gir1.2-adw-1sudo pacman -S python python-gobject gtk4 libadwaita# Clone the repository / 克隆仓库
git clone https://github.com/fcanlnony/Mini-Games-Collection.git
cd Mini-Games-Collection
# Run the application / 运行程序
python3 main.py- WASD / Arrow keys: Move tiles / 移动方块
- Swipe: Move tiles (touch) / 滑动移动方块
- Left click: Reveal cell / 揭开格子
- Right click: Flag mine / 标记地雷
- A/D or ←/→: Move left/right / 左右移动
- W or ↑: Rotate / 旋转
- S or ↓: Soft drop / 加速下落
- Space: Hard drop / 直接落下
- WASD / Arrow keys: Change direction / 改变方向
- Mouse click: Select and move pieces / 点击选择和移动棋子
- PvP / PvE modes: Play against friend or AI / 双人对战或人机对战
- Undo button: Take back moves / 悔棋按钮
- Mouse click: Select and move pieces / 点击选择和移动棋子
- PvP / PvE modes: Play against friend or AI / 双人对战或人机对战
- Undo button: Take back moves / 悔棋按钮
- Mouse click: Place X or O / 点击放置X或O
- PvP / PvE modes: Play against friend or AI / 双人对战或人机对战
Mini-Games-Collection/
├── main.py # Main application / 主程序
├── score_manager.py # Score management / 分数管理
├── i18n.py # Internationalization / 国际化
├── CLAUDE.md # AI assistant guidance / AI助手指导文档
├── games/ # Game modules / 游戏模块
│ ├── game_2048.py # 2048 game
│ ├── minesweeper.py # Minesweeper
│ ├── tetris.py # Tetris
│ ├── snake.py # Snake
│ ├── chess/ # Chess (modular) / 国际象棋(模块化)
│ │ ├── __init__.py
│ │ ├── logic.py # Game logic / 游戏逻辑
│ │ ├── ai.py # AI engine (Minimax + Alpha-Beta) / AI引擎
│ │ └── ui.py # GTK UI with animations / GTK界面带动画
│ ├── chinese_chess/ # Chinese Chess (modular) / 中国象棋(模块化)
│ │ ├── __init__.py
│ │ ├── logic.py
│ │ ├── ai.py
│ │ └── ui.py
│ └── tic_tac_toe/ # Tic-Tac-Toe / 井字棋
│ ├── __init__.py
│ ├── logic.py
│ ├── ai.py
│ └── ui.py
├── log/ # Score data storage / 分数数据存储
└── LICENSE # GPL-3.0 License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
本项目采用 GPL-3.0 许可证 - 详见 LICENSE 文件。
Shus Mo - fcanlnony@outlook.com
Contributions, issues and feature requests are welcome!
欢迎提交贡献、问题和功能请求!
- Fork the project / 复刻项目
- Create your feature branch / 创建功能分支 (
git checkout -b feature/AmazingFeature) - Commit your changes / 提交更改 (
git commit -m 'Add some AmazingFeature') - Push to the branch / 推送到分支 (
git push origin feature/AmazingFeature) - Open a Pull Request / 提交拉取请求