mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
refactor: generateCoreProvinces
This commit is contained in:
parent
2b61ac6a0f
commit
fe2f8428ad
11 changed files with 129 additions and 19 deletions
9
src/scripts/generation/pack/provinces/expandProvinces.ts
Normal file
9
src/scripts/generation/pack/provinces/expandProvinces.ts
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue