diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-04 13:47:27 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-04 13:47:27 -0700 |
commit | f4ad269f8b9f9b0bfcc60bb2584316c3fdd10d10 (patch) | |
tree | edfbff7625e33ed88eaf50c105c8bf47cd6b70c9 /src/engine | |
parent | e2e74df94fcdd2f3165e035fc00c98573f0b40d8 (diff) | |
download | the-abstraction-engine-f4ad269f8b9f9b0bfcc60bb2584316c3fdd10d10.tar.gz the-abstraction-engine-f4ad269f8b9f9b0bfcc60bb2584316c3fdd10d10.zip |
add interpreter
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/TheAbstractionEngine.ts | 7 | ||||
-rw-r--r-- | src/engine/entities/LambdaFactory.ts | 4 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/engine/TheAbstractionEngine.ts b/src/engine/TheAbstractionEngine.ts index 9ea5b90..30c3422 100644 --- a/src/engine/TheAbstractionEngine.ts +++ b/src/engine/TheAbstractionEngine.ts @@ -55,15 +55,10 @@ export class TheAbstractionEngine { const player = new Player(); this.game.addEntity(player); - const box = new FunctionBox({ x: 3, y: 1 }, "λ x . (x)"); - 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); - const factory = new LambdaFactory({ x: 6, y: 6 }, "λ x . (x)", 10); + const factory = new LambdaFactory({ x: 6, y: 6 }, "(λ (x) . x)", 10); this.game.addEntity(factory); const lockedDoor = new LockedDoor({ x: 8, y: 8 }); diff --git a/src/engine/entities/LambdaFactory.ts b/src/engine/entities/LambdaFactory.ts index 4861c6b..0721f80 100644 --- a/src/engine/entities/LambdaFactory.ts +++ b/src/engine/entities/LambdaFactory.ts @@ -134,9 +134,7 @@ export class LambdaFactory extends Entity { private codeEditor(code: string) { return ` <div> - <textarea id="code" autofocus="autofocus" rows="10" cols="50"> - ${code} - </textarea> + <textarea id="code" rows="10" cols="50">${code}</textarea> <button id="close-modal">Close</button> </div> `; |