mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
check when states greater than 10.
const neibOfNeib = naval || neib ? false : states[f].neighbors.map(n => states[n].neighbors).join("").includes(t);
not work nice?
This commit is contained in:
parent
6dd1e22e93
commit
d654967410
1 changed files with 1 additions and 1 deletions
|
|
@ -660,7 +660,7 @@
|
|||
|
||||
const naval = states[f].type === "Naval" && states[t].type === "Naval" && cells.f[states[f].center] !== cells.f[states[t].center];
|
||||
const neib = naval ? false : states[f].neighbors.includes(t);
|
||||
const neibOfNeib = naval || neib ? false : states[f].neighbors.map(n => states[n].neighbors).join("").includes(t);
|
||||
const neibOfNeib = naval || neib ? false : states[f].neighbors.some(n => states[n].neighbors.includes(t));
|
||||
|
||||
let status = naval ? rw(navals) : neib ? rw(neibs) : neibOfNeib ? rw(neibsOfNeibs) : rw(far);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue