Skip to content

Commit 48cd858

Browse files
committed
feat(interfaces): add basic interfaces
1 parent dac7cbf commit 48cd858

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// @flow
2+
3+
class Adventure {
4+
init() {}
5+
}

src/interfaces.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// @flow
2+
3+
export type Verb = "PUSH" | "PULL" | "OPEN" | "CLOSE";
4+
5+
export interface Room {
6+
id: string;
7+
name: string;
8+
items: Item[];
9+
}
10+
11+
export interface Actor {
12+
id: string;
13+
name: string;
14+
}
15+
16+
export interface Item {
17+
id: string;
18+
name: string;
19+
verbs: Map<Verb, () => void>;
20+
}

0 commit comments

Comments
 (0)