refactor: generateCoreProvinces

This commit is contained in:
Azgaar 2022-09-06 23:16:21 +03:00
parent 2b61ac6a0f
commit fe2f8428ad
11 changed files with 129 additions and 19 deletions

View file

@ -0,0 +1,9 @@
import {gauss} from "utils/probabilityUtils";
export function expandProvinces(percentage: number, cells: Pick<IPack["cells"], "i">) {
const provinceIds = new Uint16Array(cells.i.length);
const maxGrowth = percentage === 100 ? 1000 : gauss(20, 5, 5, 100) * percentage ** 0.5;
return provinceIds;
}