Add tests and move constants to config
This commit is contained in:
@@ -12,6 +12,7 @@ import { findPathAStar } from "../game/pathfinding";
|
||||
import { applyAction, stepUntilPlayerTurn } from "../game/simulation";
|
||||
import { makeTestWorld } from "../game/generator";
|
||||
import { DungeonRenderer } from "./DungeonRenderer";
|
||||
import { GAME_CONFIG } from "../game/config/GameConfig";
|
||||
|
||||
export class GameScene extends Phaser.Scene {
|
||||
private world!: World;
|
||||
@@ -20,7 +21,7 @@ export class GameScene extends Phaser.Scene {
|
||||
private levelIndex = 1;
|
||||
|
||||
private runState: RunState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { ...GAME_CONFIG.player.initialStats },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
@@ -41,7 +42,7 @@ export class GameScene extends Phaser.Scene {
|
||||
this.cursors = this.input.keyboard!.createCursorKeys();
|
||||
|
||||
// Camera
|
||||
this.cameras.main.setZoom(2);
|
||||
this.cameras.main.setZoom(GAME_CONFIG.rendering.cameraZoom);
|
||||
|
||||
// Initialize Sub-systems
|
||||
this.dungeonRenderer = new DungeonRenderer(this);
|
||||
|
||||
Reference in New Issue
Block a user