summaryrefslogtreecommitdiff
path: root/src/engine/TheAbstractionEngine.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-07 22:49:43 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-07 22:49:43 -0700
commitebae24f5a3a251654a1e41be58f52ba2a777d9d7 (patch)
tree6641c3e5a5ec5d812c54be2bb38196f85f4e36c2 /src/engine/TheAbstractionEngine.ts
parent808a44e8542ebc7542d833e5a30b51b7fb8f80d5 (diff)
downloadthe-abstraction-engine-ebae24f5a3a251654a1e41be58f52ba2a777d9d7.tar.gz
the-abstraction-engine-ebae24f5a3a251654a1e41be58f52ba2a777d9d7.zip
level system!
Diffstat (limited to 'src/engine/TheAbstractionEngine.ts')
-rw-r--r--src/engine/TheAbstractionEngine.ts33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/engine/TheAbstractionEngine.ts b/src/engine/TheAbstractionEngine.ts
index 93684ef..29bc553 100644
--- a/src/engine/TheAbstractionEngine.ts
+++ b/src/engine/TheAbstractionEngine.ts
@@ -1,14 +1,6 @@
import { Game } from ".";
import { Miscellaneous, loadAssets } from "./config";
-import {
- Player,
- Wall,
- LambdaFactory,
- Key,
- LockedDoor,
- Curry,
- FunctionApplication,
-} from "./entities";
+import { LevelNames } from "./levels";
import {
Grid,
FacingDirection,
@@ -18,6 +10,7 @@ import {
GridSpawner,
Life,
Music,
+ Level,
} from "./systems";
export class TheAbstractionEngine {
@@ -40,6 +33,7 @@ export class TheAbstractionEngine {
const facingDirectionSystem = new FacingDirection(inputSystem);
[
+ new Level(LevelNames.LevelSelection),
inputSystem,
facingDirectionSystem,
new Grid(
@@ -55,27 +49,6 @@ export class TheAbstractionEngine {
new Music(),
new Render(this.ctx),
].forEach((system) => this.game.addSystem(system));
-
- const player = new Player();
- this.game.addEntity(player);
-
- const wall = new Wall({ x: 5, y: 3 });
- this.game.addEntity(wall);
-
- const factory = new LambdaFactory({ x: 3, y: 3 }, "(λ (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);
-
- const application = new FunctionApplication({ x: 5, y: 5 }, "(_INPUT key)");
- this.game.addEntity(application);
}
public play() {