JonasStjerne / resilient-pathfinding

https://p7-xi.vercel.app
0 stars 0 forks source link

Save grid to filesystem #96

Closed Yhennon closed 7 months ago

Yhennon commented 8 months ago

Added feature to create saves of the grid as JSON files to local file system, and to load appropriate JSONfiles from file system.

Files saved this way will have the name "inputname_gridSizexcanvasSize.json" , for example: TestSave1_10x500.json.

Done this so when later we have different grids, it will be easier to differentiate between saves. In order to do this, i made the gridSize and canvasSize variables globally available, and additionally the gridSize as a parameter for makeGrid() is no longer optional.

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
p7 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 16, 2023 10:58am
Yhennon commented 8 months ago

Currently there is a bug, when trying to load a file from file system (clicking on the file input), the popup window shows up twice instead of the normal 1 time. Couldn't find why this is happening