Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenMian committed Aug 1, 2024
1 parent 2352348 commit 28576f8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[介绍](introduction.md)

- [关卡](level/README.md)
- [API 设计 🚧](level/api_design.md)
- [表示](level/representation.md)
- [构造](level/construction.md)
- [标准化 🚧](level/normalization.md)
Expand Down
17 changes: 17 additions & 0 deletions src/level/api_design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# API 设计

结构体:

- `Map`: 存储地图数据, 包括墙体和地板布局. 还有玩家位置, 箱子和目标位置, 方便快速读取.
- `Actions`: 存储玩家动作, 包括动作的类型(移动或推动), 以及方向(上下左右).
- `Level`: 关卡, 包含地图和玩家动作. 可以执行或撤销操作.

它们之间的转换关系如下:

```mermaid
flowchart LR
A[String] -->|XSB 格式| B[Map]
A -->|LURD 格式| C[Actions]
B --> D[Level]
C --> B
```

0 comments on commit 28576f8

Please sign in to comment.