Metadata-Version: 2.4
Name: terminalhero
Version: 1.0.1
Summary: A command-line pixel platformer game for programmers
Author: TerminalHero Team
License: MIT
Project-URL: Homepage, https://github.com/TazmiDev/terminalhero
Project-URL: Repository, https://github.com/TazmiDev/terminalhero
Project-URL: Issues, https://github.com/TazmiDev/terminalhero/issues
Keywords: game,terminal,pixel,platformer,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Games/Entertainment
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: windows-curses>=2.3.0; platform_system == "Windows"
Dynamic: license-file
Dynamic: requires-python

# TerminalHero - 命令行像素闯关游戏

## 项目结构

```
TerminalHero/
├── main.py              # 游戏主入口（唯一入口）
├── play.bat            # Windows 启动脚本
├── README.md           # 项目说明
├── requirements.txt    # 依赖文件
├── utils/              # 工具模块
│   ├── __init__.py
│   ├── constants.py    # 常量定义
│   └── input_handler.py # 输入处理
├── models/             # 数据模型
│   ├── __init__.py
│   ├── entities.py     # 实体类（Player, Enemy等）
│   └── level.py        # 关卡系统
└── core/               # 核心逻辑
    ├── __init__.py
    ├── renderer.py     # 渲染引擎
    └── game_engine.py  # 游戏引擎
```

## 模块化设计

- **`utils/`** - 工具模块，包含常量和输入处理
- **`models/`** - 数据模型，包含实体和关卡
- **`core/`** - 核心逻辑，包含渲染器和游戏引擎
- **`main.py`** - 唯一入口文件

## 特性

- 🎮 **命令行界面** - 看起来像普通的终端输出，非常隐蔽
- 🏃 **流畅的物理引擎** - 重力、跳跃、碰撞检测
- 👾 **敌人系统** - 可以踩扁敌人获得分数
- 🪙 **金币收集** - 收集金币增加分数
- 🏁 **多关卡设计** - 到达大门即可通关
- 💾 **分数系统** - 记录你的最高分
- ⏸️ **暂停功能** - 随时暂停游戏

## 操作说明

| 按键               | 功能      |
| ---------------- | ------- |
| `A` / `←`        | 向左移动    |
| `D` / `→`        | 向右移动    |
| `W` / `↑` / `空格` | 跳跃      |
| `P`              | 暂停/继续游戏 |
| `Q` / `ESC`      | 退出游戏    |

## 游戏元素

| 符号        | 说明           |
| --------- | ------------ |
| `P`       | 玩家角色         |
| `██`      | 地面           |
| `▓▓`      | 砖块平台         |
| `▒▒`      | 可顶方块（顶一下有金币） |
| `░░`      | 已顶方块         |
| `│` / `┬` | 管道           |
| `○`       | 金币           |
| `G`       | 敌人（板栗仔）      |
| `▒▒`      | 大门（终点）       |

## 安装和运行

### 前提条件

- Python 3.6+
- Windows 系统需要安装 `windows-curses`:
  ```bash
  pip install windows-curses
  ```

### 运行游戏

**通过 pip 安装后：**

```bash
terminalhero
```

**Windows 本地运行：**

```bash
play.bat
```

**或者直接用 Python:**

```bash
python main.py
```

## 开发指南

### 添加新关卡

编辑 `utils/constants.py` 中的 `LevelConfig` 类。

### 添加新敌人类型

在 `models/entities.py` 中继承 `Enemy` 类。

### 修改物理参数

在 `utils/constants.py` 中调整 `GRAVITY`、`JUMP_FORCE` 等常量。

## 许可

MIT License - 自由使用和修改

***

**注意**: 请合理安排游戏时间，不要影响工作哦！😉
