Merge branch 'main' into compare/scenario2601-200-parity-20260815
This commit is contained in:
@@ -14,7 +14,7 @@ import { createNpcTaxHandler } from '../../src/turn/npcTaxHandler.js';
|
||||
import { createFrontStateHandler } from '../../src/turn/frontStateHandler.js';
|
||||
import { createNationTurnMonthlyHandler } from '../../src/turn/nationTurnMonthlyHandler.js';
|
||||
|
||||
export const createMockPrisma = (initialGeneralRows: any[] = []) => {
|
||||
const createMockPrisma = (initialGeneralRows: any[] = []) => {
|
||||
let generalRows = [...initialGeneralRows];
|
||||
return {
|
||||
generalTurn: {
|
||||
@@ -47,7 +47,7 @@ export const createMockPrisma = (initialGeneralRows: any[] = []) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const addMinutes = (time: Date, minutes: number): Date => new Date(time.getTime() + minutes * 60_000);
|
||||
const addMinutes = (time: Date, minutes: number): Date => new Date(time.getTime() + minutes * 60_000);
|
||||
|
||||
export type TurnHarnessRunOptions = {
|
||||
minutes?: number;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { asRecord } from '@sammo-ts/common';
|
||||
import { asRecord, ManualClock } from '@sammo-ts/common';
|
||||
|
||||
import {
|
||||
InMemoryControlQueue,
|
||||
EngineStateManager,
|
||||
ManualClock,
|
||||
TurnDaemonLifecycle,
|
||||
type TurnDaemonCommandResult,
|
||||
type TurnProcessor,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import {
|
||||
createItemInventoryFromSlots,
|
||||
ITEM_KEYS,
|
||||
LogCategory,
|
||||
LogScope,
|
||||
@@ -9,6 +8,7 @@ import {
|
||||
type ItemModule,
|
||||
type Nation,
|
||||
} from '@sammo-ts/logic';
|
||||
import { createItemInventoryFromSlots } from '@sammo-ts/logic/items/inventory.js';
|
||||
|
||||
import { InMemoryTurnWorld } from '../src/turn/inMemoryWorld.js';
|
||||
import { createUpdateNationLevelHandler } from '../src/turn/monthlyNationLevelAction.js';
|
||||
@@ -148,9 +148,7 @@ const buildHarness = async (
|
||||
generals: [buildGeneral(1), buildGeneral(2, { meta: { killturn: 850, belong: 30 } })],
|
||||
cities: [
|
||||
...Array.from({ length: cityCount }, (_, index) => buildCity(index + 1)),
|
||||
...Array.from({ length: options.neutralCityCount ?? 0 }, (_, index) =>
|
||||
buildCity(cityCount + index + 1, 0)
|
||||
),
|
||||
...Array.from({ length: options.neutralCityCount ?? 0 }, (_, index) => buildCity(cityCount + index + 1, 0)),
|
||||
],
|
||||
nations: [
|
||||
...(options.neutralCityCount
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { TurnGeneral, TurnWorldSnapshot, TurnWorldState } from '../src/turn
|
||||
import type { GeneralAiDebugState } from '../src/turn/ai/generalAi.js';
|
||||
import type { InMemoryTurnWorld } from '../src/turn/inMemoryWorld.js';
|
||||
import { GeneralAI } from '../src/turn/ai/generalAi.js';
|
||||
import { do징병 } from '../src/turn/ai/generalAiGeneralActions.js';
|
||||
import { do징병 } from '../src/turn/ai/generalAi/general/recruitActions.js';
|
||||
import { buildCommandEnv, buildReservedTurnDefinitions } from '../src/turn/reservedTurnCommands.js';
|
||||
import { LARGE_TEST_MAP, buildLargeTestCities } from './fixtures/largeTestMap.js';
|
||||
import { round } from 'es-toolkit';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
|
||||
import { createGamePostgresConnector, type GamePrisma, type GamePrismaClient } from '@sammo-ts/infra';
|
||||
import { GAME_TICKS_PER_TURN } from '@sammo-ts/common';
|
||||
import { SystemClock } from '../src/lifecycle/clock.js';
|
||||
import { SystemClock } from '@sammo-ts/common';
|
||||
import { DatabaseTurnDaemonCommandQueue } from '../src/lifecycle/databaseCommandQueue.js';
|
||||
import { getNextTickTime } from '../src/lifecycle/getNextTickTime.js';
|
||||
import { TurnDaemonLifecycle } from '../src/lifecycle/turnDaemonLifecycle.js';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { ManualClock } from '@sammo-ts/common';
|
||||
|
||||
import {
|
||||
InMemoryControlQueue,
|
||||
EngineStateManager,
|
||||
ManualClock,
|
||||
TurnDaemonLifecycle,
|
||||
getNextTickTime,
|
||||
type TurnProcessor,
|
||||
|
||||
Reference in New Issue
Block a user