forked from ChalmersGU-AI-course/shrdlite-course-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorld.ts
29 lines (24 loc) · 770 Bytes
/
World.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
///<reference path="Interpreter.ts"/>
// Interface definitions for worlds
interface ObjectDefinition {
form: string;
size: string;
color: string;
}
interface WorldState {
stacks: string[][];
holding: string;
arm: number;
objects: { [s:string]: ObjectDefinition; };
examples: string[];
}
interface World {
currentState : WorldState;
previousRes : Interpreter.Result[];
printWorld(callback? : () => void) : void;
performPlan(plan: string[], callback? : () => void) : void;
readUserInput(prompt : string, callback : (string) => void) : void;
printSystemOutput(output : string, participant? : string) : void;
printDebugInfo(info : string) : void;
printError(error : string, message? : string) : void;
}