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
30
31
32
33
|
import { Level, LevelNames } from ".";
import { Game } from "..";
import {
Curry,
FunctionApplication,
LambdaFactory,
LockedDoor,
Player,
Sign,
Wall,
} from "../entities";
export class Tutorial extends Level {
constructor() {
super(LevelNames.Tutorial);
}
public init(game: Game): void {
const entities = [
new Sign("TODO: Explain entities", { x: 4, y: 3 }),
new Wall({ x: 10, y: 9 }),
new Wall({ x: 10, y: 11 }),
new Wall({ x: 11, y: 10 }),
new Curry({ x: 10, y: 10 }),
new LockedDoor({ x: 9, y: 10 }),
new LambdaFactory({ x: 6, y: 3 }, "// TODO: Remove line\n(λ (x) . x)", 3),
new FunctionApplication({ x: 6, y: 6 }, "(_INPUT _KEY)"),
new Player({ x: 2, y: 2 }),
];
entities.forEach((entity) => game.addEntity(entity));
}
}
|