mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
refactor: expandProvinces
This commit is contained in:
parent
fe2f8428ad
commit
a1e7727730
5 changed files with 152 additions and 65 deletions
|
|
@ -7,7 +7,7 @@ export function generateProvinces(
|
|||
states: TStates,
|
||||
burgs: TBurgs,
|
||||
cultures: TCultures,
|
||||
cells: Pick<IPack["cells"], "i">
|
||||
cells: Pick<IPack["cells"], "i" | "c" | "h" | "t" | "state" | "burg">
|
||||
) {
|
||||
TIME && console.time("generateProvinces");
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ export function generateProvinces(
|
|||
return {provinceIds: new Uint16Array(cells.i.length), provinces: [] as TProvinces[]};
|
||||
|
||||
const coreProvinces = generateCoreProvinces(states, burgs, cultures, percentage);
|
||||
const provinceIds = expandProvinces(percentage, cells);
|
||||
const provinceIds = expandProvinces(percentage, coreProvinces, cells);
|
||||
|
||||
const provinces = [...coreProvinces];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue