refactor: remove rest POIs from map generation, persistence, and client rendering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-09 17:58:02 +00:00
parent b76ce16cba
commit 65ee23c5be
10 changed files with 8 additions and 44 deletions
+2 -8
View File
@@ -7,7 +7,6 @@ export interface GeneratedMap {
trunkDecorations: number[];
obstacles: Set<string>;
foodPositions: { x: number; y: number }[];
restPositions: { x: number; y: number }[];
resourceTiles: Array<{ x: number; y: number; resourceType: string }>;
}
@@ -42,14 +41,9 @@ export function generateMap(
{ x: Math.floor(width * 0.25), y: Math.floor(height * 0.25) },
{ x: Math.floor(width * 0.75), y: Math.floor(height * 0.75) },
];
const restPositions = [
{ x: Math.floor(width * 0.75), y: Math.floor(height * 0.25) },
{ x: Math.floor(width * 0.25), y: Math.floor(height * 0.75) },
];
// Reserve positions that must stay clear
const reserved = new Set<string>();
for (const p of [...foodPositions, ...restPositions]) {
for (const p of [...foodPositions]) {
reserved.add(`${p.x},${p.y}`);
}
@@ -157,5 +151,5 @@ export function generateMap(
}
}
return { terrain, decorations, trunkDecorations, obstacles, foodPositions, restPositions, resourceTiles };
return { terrain, decorations, trunkDecorations, obstacles, foodPositions, resourceTiles };
}