/** * critique.ts — review a map the way a game designer would. * * Beyond "is it valid?" (that's validate.ts), this asks "is it good?": how much * dead space, whether the playable area feels empty or cluttered, whether * interactables are spread out or all bunched in one corner, whether the floor * is visually monotonous, and whether the walkable space is fragmented. Each * finding carries a justification and an actionable suggestion. * * Roadmap #7 (Crítica de mapas) and #11 (IA orientada al diseño). */ import { type PlaceableMap } from "../utils/placement.js"; export interface CritiqueEvent { id: number; name: string; x: number; y: number; } export type FindingKind = "praise" | "info" | "suggestion"; export interface CritiqueFinding { kind: FindingKind; category: string; message: string; } export interface MapCritique { mapId?: number; hasPassability: boolean; metrics: { width: number; height: number; totalTiles: number; walkableTiles: number; walkablePct: number; decorationTiles: number; decorationPctOfWalkable: number; eventCount: number; eventsPer100Walkable: number; distinctGroundTiles: number; standableRegions: number; emptyQuadrants: string[]; }; findings: CritiqueFinding[]; score: number; } /** Produce a designer-style critique of a single map. */ export declare function critiqueMap(map: PlaceableMap, flags: number[] | null, events: CritiqueEvent[], mapId?: number): MapCritique;