refactor and fix saved grid algo.

This commit is contained in:
GoteGuru 2022-06-20 18:39:50 +02:00
parent 4291777bc4
commit f4b3662cba
7 changed files with 37 additions and 33 deletions

View file

@ -263,7 +263,9 @@ function getName(id) {
}
function getGraph(currentGraph) {
const newGraph = shouldRegenerateGrid(currentGraph) ? generateGrid() : deepCopy(currentGraph);
const newGraph = shouldRegenerateGrid(currentGraph)
? generateGrid(currentGraph.cellsDesired, currentGraph.generator)
: deepCopy(currentGraph);
delete newGraph.cells.h;
return newGraph;
}