Skip to content

Commit 5e94f31

Browse files
committed
doc: add some document for stage: string[]
1 parent ac2bb44 commit 5e94f31

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/stages.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1+
/**
2+
Stage Grid, expressed as list of row from x=0 to x=max(x).
3+
All rows are expected to equal in length. (but there's no runtime check afaik)
4+
Example:
5+
[
6+
"bbbbbbbbbbb", // b stands for block
7+
"...........", // . stands for air
8+
".....m..bbb", // m stands for movable block
9+
"bbbbbbbbbbb"
10+
]
11+
*/
12+
type Stage = string[];
13+
114
export type StageDefinition = {
2-
stage: string[];
15+
stage: Stage;
316
initialPlayerX: number; // 左端から0-indexed
417
initialPlayerY: number; // 上端から0-indexed +1すると浮かずに地面に立つ
518
blockGroups: {

0 commit comments

Comments
 (0)