diff options
Diffstat (limited to 'src/engine/TheAbstractionEngine.ts')
-rw-r--r-- | src/engine/TheAbstractionEngine.ts | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/engine/TheAbstractionEngine.ts b/src/engine/TheAbstractionEngine.ts index 7f71fd5..e84093f 100644 --- a/src/engine/TheAbstractionEngine.ts +++ b/src/engine/TheAbstractionEngine.ts @@ -1,12 +1,21 @@ import { Game } from "."; import { Miscellaneous, loadAssets } from "./config"; -import { Player, FunctionBox, Wall, LambdaFactory } from "./entities"; +import { + Player, + FunctionBox, + Wall, + LambdaFactory, + Key, + LockedDoor, + Curry, +} from "./entities"; import { Grid, FacingDirection, Input, Render, LambdaFactory as LambdaFactorySpawnSystem, + Collision, } from "./systems"; export class TheAbstractionEngine { @@ -39,6 +48,7 @@ export class TheAbstractionEngine { }, ), new LambdaFactorySpawnSystem(), + new Collision(), new Render(this.ctx), ].forEach((system) => this.game.addSystem(system)); @@ -55,6 +65,15 @@ export class TheAbstractionEngine { const factory = new LambdaFactory({ x: 6, y: 6 }, "λ x . (x)", 10); this.game.addEntity(factory); + + const lockedDoor = new LockedDoor({ x: 8, y: 8 }); + this.game.addEntity(lockedDoor); + + const key = new Key({ x: 7, y: 7 }); + this.game.addEntity(key); + + const curry = new Curry({ x: 9, y: 8 }); + this.game.addEntity(curry); } public play() { |