feat: 턴 다이아몬드 CLI 추가 및 상태 관리 개선

This commit is contained in:
2025-12-29 07:50:35 +00:00
parent 86c5d5f111
commit e0eb768e2e
6 changed files with 212 additions and 13 deletions
+4 -1
View File
@@ -67,13 +67,16 @@ export const createTurnDaemonRuntime = async (
});
const tickMinutes = resolveTickMinutes(state.tickSeconds, options.tickMinutes);
const resolvedState = options.tickMinutes
? { ...state, tickSeconds: tickMinutes * 60 }
: state;
const schedule = options.schedule ?? buildFixedSchedule(tickMinutes);
const worldOptions: InMemoryTurnWorldOptions = {
schedule,
generalTurnHandler: options.generalTurnHandler,
calendarHandler: options.calendarHandler,
};
const world = new InMemoryTurnWorld(state, snapshot, worldOptions);
const world = new InMemoryTurnWorld(resolvedState, snapshot, worldOptions);
const stateStore = new InMemoryTurnStateStore(world);
const processor = new InMemoryTurnProcessor(world, { tickMinutes });