There was an error while loading. Please reload this page.
1 parent db3bb26 commit 69b34d0Copy full SHA for 69b34d0
src/index.js
@@ -1,5 +1,6 @@
1
// @flow
2
3
class Adventure {
4
+ register() {}
5
init() {}
6
}
src/interfaces.js
@@ -14,18 +14,24 @@ export type Verb =
14
export interface Room {
15
id: string;
16
name: string;
17
- items: Item[];
+ items: Map<string, Item>;
18
+ actors: Map<string, Actor>;
19
+ currentActor: Actor;
20
+ currentVerb: Verb;
21
22
23
export interface Actor {
24
25
26
inventory: Item[];
27
do: (verb: Verb) => void;
28
+ moveTo: (x: number, y: number) => void;
29
+ say: (text: string) => void;
30
31
32
export interface Item {
33
34
35
verbs: Map<Verb, () => void>;
36
+ inventoryImage: string;
37
0 commit comments