Skip to content

Commit 7e04c2a

Browse files
committed
Reorganize project into folders instead of flat prefixed filenames
Replace long prefixed filenames with directory structure: - src/client/game-client-*.ts -> src/client/game/*.ts - src/client/renderer-*.ts -> src/client/renderer/*.ts - src/client/ui-*.ts -> src/client/ui/*.ts - src/shared/engine-*.ts + game-engine.ts -> src/shared/engine/*.ts - src/server/game-do-*.ts -> src/server/game-do/*.ts All import paths updated across 102 files. No behavioral changes.
1 parent 6577fc7 commit 7e04c2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+338
-357
lines changed

scripts/simulate-ai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
beginCombatPhase,
99
processCombat,
1010
skipCombat
11-
} from '../src/shared/game-engine';
11+
} from '../src/shared/engine/game-engine';
1212
import { aiAstrogation, aiOrdnance, aiCombat, AIDifficulty } from '../src/shared/ai';
1313
import { SHIP_STATS } from '../src/shared/constants';
1414
import { GameState, FleetPurchase } from '../src/shared/types';
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { describe, expect, it, vi } from 'vitest';
22

3-
import { buildSolarSystemMap } from '../shared/map-data';
4-
import type { AstrogationOrder, CombatAttack, GameState, OrdnanceLaunch, PlayerState, Ship } from '../shared/types';
5-
import { deriveAIActionPlan } from './game-client-ai-flow';
3+
import { buildSolarSystemMap } from '../../shared/map-data';
4+
import type { AstrogationOrder, CombatAttack, GameState, OrdnanceLaunch, PlayerState, Ship } from '../../shared/types';
5+
import { deriveAIActionPlan } from './ai-flow';
66

77
function createShip(overrides: Partial<Ship> = {}): Ship {
88
return {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { type AIDifficulty, aiAstrogation, aiCombat, aiOrdnance } from '../shared/ai';
2-
import { SHIP_STATS } from '../shared/constants';
3-
import { filterStateForPlayer } from '../shared/game-engine';
4-
import type { AstrogationOrder, CombatAttack, GameState, OrdnanceLaunch, SolarSystemMap } from '../shared/types';
5-
import { hasOwnedPendingAsteroidHazards } from './game-client-local';
1+
import { type AIDifficulty, aiAstrogation, aiCombat, aiOrdnance } from '../../shared/ai';
2+
import { SHIP_STATS } from '../../shared/constants';
3+
import { filterStateForPlayer } from '../../shared/engine/game-engine';
4+
import type { AstrogationOrder, CombatAttack, GameState, OrdnanceLaunch, SolarSystemMap } from '../../shared/types';
5+
import { hasOwnedPendingAsteroidHazards } from './local';
66

77
export interface AIDecisionGenerators {
88
astrogation: typeof aiAstrogation;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it } from 'vitest';
22

3-
import type { GameState, PlayerState, Ship } from '../shared/types';
4-
import { deriveScenarioBriefingEntries } from './game-client-briefing';
3+
import type { GameState, PlayerState, Ship } from '../../shared/types';
4+
import { deriveScenarioBriefingEntries } from './briefing';
55

66
function createShip(overrides: Partial<Ship> = {}): Ship {
77
return {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { GameState } from '../shared/types';
2-
import { getScenarioBriefingLines } from './game-client-helpers';
1+
import type { GameState } from '../../shared/types';
2+
import { getScenarioBriefingLines } from './helpers';
33

44
export interface BriefingLogEntry {
55
text: string;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it } from 'vitest';
22

3-
import type { GameState, PlayerState, Ship } from '../shared/types';
4-
import { deriveBurnChangePlan } from './game-client-burn';
3+
import type { GameState, PlayerState, Ship } from '../../shared/types';
4+
import { deriveBurnChangePlan } from './burn';
55

66
function createShip(overrides: Partial<Ship> = {}): Ship {
77
return {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { GameState } from '../shared/types';
1+
import type { GameState } from '../../shared/types';
22

33
export type BurnChangePlan =
44
| { kind: 'noop' }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest';
2-
import type { CombatAttack, GameState, Ordnance, PlayerState, Ship, SolarSystemMap } from '../shared/types';
2+
import type { CombatAttack, GameState, Ordnance, PlayerState, Ship, SolarSystemMap } from '../../shared/types';
33
import {
44
buildCurrentAttack,
55
countRemainingCombatAttackers,
@@ -12,7 +12,7 @@ import {
1212
getReusableCombatGroup,
1313
hasSplitFireOptions,
1414
toggleCombatAttackerSelection,
15-
} from './game-client-combat';
15+
} from './combat';
1616

1717
function createShip(overrides: Partial<Ship> = {}): Ship {
1818
return {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { canAttack, getCombatStrength, hasLineOfSight, hasLineOfSightToTarget } from '../shared/combat';
2-
import { type HexCoord, hexEqual } from '../shared/hex';
3-
import type { CombatAttack, GameState, SolarSystemMap } from '../shared/types';
4-
import type { PlanningState } from './renderer';
1+
import { canAttack, getCombatStrength, hasLineOfSight, hasLineOfSightToTarget } from '../../shared/combat';
2+
import { type HexCoord, hexEqual } from '../../shared/hex';
3+
import type { CombatAttack, GameState, SolarSystemMap } from '../../shared/types';
4+
import type { PlanningState } from '../renderer/renderer';
55

66
type CombatPlanningSnapshot = Pick<
77
PlanningState,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it } from 'vitest';
22

3-
import type { GameState, PlayerState, Ship } from '../shared/types';
4-
import { deriveGameOverPlan } from './game-client-endgame';
3+
import type { GameState, PlayerState, Ship } from '../../shared/types';
4+
import { deriveGameOverPlan } from './endgame';
55

66
function createShip(overrides: Partial<Ship> = {}): Ship {
77
return {

0 commit comments

Comments
 (0)