refactor(#902): locked states cells to be assigned on start

This commit is contained in:
Azgaar 2022-12-16 02:52:51 +03:00
parent e984c708d1
commit aa29f69bbf
2 changed files with 8 additions and 6 deletions

View file

@ -364,7 +364,7 @@ window.BurgsAndStates = (function () {
TIME && console.time("expandStates");
const {cells, states, cultures, burgs} = pack;
cells.state = new Uint16Array(cells.i.length);
cells.state = cells.state || new Uint16Array(cells.i.length);
const queue = new PriorityQueue({comparator: (a, b) => a.p - b.p});
const cost = [];
const neutral = (cells.i.length / 5000) * 2500 * neutralInput.value * statesNeutral; // limit cost for state growth