summaryrefslogtreecommitdiff
path: root/src/engine/TheAbstractionEngine.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/TheAbstractionEngine.ts')
-rw-r--r--src/engine/TheAbstractionEngine.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/engine/TheAbstractionEngine.ts b/src/engine/TheAbstractionEngine.ts
index 15ef011..2db599b 100644
--- a/src/engine/TheAbstractionEngine.ts
+++ b/src/engine/TheAbstractionEngine.ts
@@ -1,8 +1,7 @@
import { Game } from ".";
import { Miscellaneous, loadAssets } from "./config";
-import { Player, FunctionBox } from "./entities";
-import { FacingDirection, Input, Render } from "./systems";
-import { Grid } from "./systems/Grid";
+import { Player, FunctionBox, Wall } from "./entities";
+import { Grid, FacingDirection, Input, Render } from "./systems";
export class TheAbstractionEngine {
private game: Game;
@@ -24,7 +23,6 @@ export class TheAbstractionEngine {
const facingDirectionSystem = new FacingDirection(inputSystem);
[
- new Render(this.ctx),
inputSystem,
facingDirectionSystem,
new Grid(
@@ -34,6 +32,7 @@ export class TheAbstractionEngine {
height: Miscellaneous.GRID_CELL_HEIGHT,
},
),
+ new Render(this.ctx),
].forEach((system) => this.game.addSystem(system));
const player = new Player();
@@ -43,6 +42,9 @@ export class TheAbstractionEngine {
this.game.addEntity(box);
const box2 = new FunctionBox({ x: 4, y: 1 }, "λ x . (x)");
this.game.addEntity(box2);
+
+ const wall = new Wall({ x: 5, y: 3 });
+ this.game.addEntity(wall);
}
public play() {