diff options
Diffstat (limited to '')
-rw-r--r-- | client/src/map.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/src/map.ts b/client/src/map.ts index e6fab9d..d26c467 100644 --- a/client/src/map.ts +++ b/client/src/map.ts @@ -126,6 +126,24 @@ export const genItems = (map: Map): Items => { let mapData: Maps = {} let id: number = 0 +export const genMap = ( + width: number, + height: number, + data: number[], + mapId: number, +): Map => { + + mapData[mapId] = { + data: structuredClone(data), + walls: genWalls(width, height, data), + width, + height, + id: mapId + } + + return mapData[mapId] +} + export const loadMap = ( width: number, height: number, |