diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-07 22:49:43 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-07 22:49:43 -0700 |
commit | ebae24f5a3a251654a1e41be58f52ba2a777d9d7 (patch) | |
tree | 6641c3e5a5ec5d812c54be2bb38196f85f4e36c2 /src/engine/levels/Tutorial.ts | |
parent | 808a44e8542ebc7542d833e5a30b51b7fb8f80d5 (diff) | |
download | the-abstraction-engine-ebae24f5a3a251654a1e41be58f52ba2a777d9d7.tar.gz the-abstraction-engine-ebae24f5a3a251654a1e41be58f52ba2a777d9d7.zip |
level system!
Diffstat (limited to 'src/engine/levels/Tutorial.ts')
-rw-r--r-- | src/engine/levels/Tutorial.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/engine/levels/Tutorial.ts b/src/engine/levels/Tutorial.ts new file mode 100644 index 0000000..165b10f --- /dev/null +++ b/src/engine/levels/Tutorial.ts @@ -0,0 +1,32 @@ +import { Level, LevelNames } from "."; +import { Game } from ".."; +import { + Curry, + FunctionApplication, + LambdaFactory, + LockedDoor, + Player, + Wall, +} from "../entities"; + +export class Tutorial extends Level { + constructor() { + super(LevelNames.Tutorial); + } + + public init(game: Game): void { + const entities = [ + new Player({ x: 2, y: 2 }), + new Wall({ x: 10, y: 9 }), + new Wall({ x: 10, y: 11 }), + new Wall({ x: 11, y: 10 }), + new Curry({ x: 10, y: 10 }), + new LockedDoor({ x: 9, y: 10 }), + new LambdaFactory({ x: 6, y: 3 }, "(λ (x) . x)", 3), + + new FunctionApplication({ x: 6, y: 6 }, "(_INPUT key)"), + ]; + + entities.forEach((entity) => game.addEntity(entity)); + } +} |