Refactor player and room to support adding effects.
This commit is contained in:
18
Game.ts
Normal file
18
Game.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import type Player from "./Player.ts";
|
||||
import type Scene from "./Scene.ts";
|
||||
|
||||
export default class Game {
|
||||
#player: Player;
|
||||
#scene: Scene;
|
||||
|
||||
constructor(player: Player, scene: Scene) {
|
||||
this.#player = player;
|
||||
this.#scene = scene;
|
||||
}
|
||||
|
||||
lookAtScene(): string {
|
||||
const { effects } = this.#player;
|
||||
|
||||
return this.#scene.look(effects);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user