feat: add troop model and integrate troop handling in game logic

This commit is contained in:
2025-12-30 05:41:16 +00:00
parent 648d186428
commit 519a0a76cb
12 changed files with 188 additions and 14 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
import type { City, General, Nation } from '../domain/entities.js';
import type { City, General, Nation, Troop } from '../domain/entities.js';
import type { ScenarioConfig } from '../scenario/types.js';
import type { ScenarioMeta } from '../world/types.js';
@@ -6,11 +6,13 @@ import type { ScenarioMeta } from '../world/types.js';
export interface WorldStateSnapshotSource<
GeneralType extends General = General,
CityType extends City = City,
NationType extends Nation = Nation
NationType extends Nation = Nation,
TroopType extends Troop = Troop
> {
listGenerals(): Promise<GeneralType[]>;
listCities(): Promise<CityType[]>;
listNations(): Promise<NationType[]>;
listTroops(): Promise<TroopType[]>;
}
export interface ScenarioConfigSource {