Add tests and move constants to config

This commit is contained in:
Peter Stockings
2026-01-04 10:27:27 +11:00
parent 6e3763a17b
commit f3607bc167
9 changed files with 484 additions and 35 deletions

View File

@@ -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);