summaryrefslogtreecommitdiff
path: root/src/engine/TheAbstractionEngine.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-02 02:22:46 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-02 02:24:18 -0700
commit06bb4177202b432d5f42141975ec82b5a8837f0e (patch)
tree7a9cb1e4177684848a3fcca91eed2ec703c787fb /src/engine/TheAbstractionEngine.ts
parentcd6a3a56b0a9f27dd7250c7641776fe1bd184888 (diff)
downloadthe-abstraction-engine-06bb4177202b432d5f42141975ec82b5a8837f0e.tar.gz
the-abstraction-engine-06bb4177202b432d5f42141975ec82b5a8837f0e.zip
slight refactor in collision behavior
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() {