feat: add logical game clock

This commit is contained in:
2026-08-04 02:51:27 +00:00
parent 87965a39d6
commit a26031dc3f
51 changed files with 1605 additions and 398 deletions
+7
View File
@@ -170,6 +170,13 @@ describe('InMemoryTurnProcessor ordering', () => {
expect(world.getNextGeneralId()).toBe(4);
expect(world.getNextGeneralId()).toBe(5);
expect(world.getState().meta).toMatchObject({ lastGeneralId: 5 });
const overdue = world.getGeneralById(1);
expect(overdue).toBeDefined();
overdue!.turnTime = addMinutes(baseTime, 5);
const overdueResult = await processor.run(addMinutes(baseTime, 5), budget);
expect(overdueResult.processedGenerals).toBe(1);
expect(executed.at(-1)).toBe(1);
});
it('stops catch-up immediately after a calendar handler finalizes unification', async () => {