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:
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user