mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
fixed invationCells spelling
Fixed invationCells to invasionCells. Is invasion with s.
This commit is contained in:
parent
d91fe8a8ef
commit
f879b65664
1 changed files with 3 additions and 3 deletions
|
|
@ -50,14 +50,14 @@ window.Zones = (function () {
|
|||
const startCell = ra(borderCells);
|
||||
if (startCell === undefined) return;
|
||||
|
||||
const invationCells = [];
|
||||
const invasionCells = [];
|
||||
const queue = [startCell];
|
||||
const maxCells = rand(5, 30);
|
||||
|
||||
while (queue.length) {
|
||||
const cellId = P(0.4) ? queue.shift() : queue.pop();
|
||||
invationCells.push(cellId);
|
||||
if (invationCells.length >= maxCells) break;
|
||||
invasionCells.push(cellId);
|
||||
if (invasionCells.length >= maxCells) break;
|
||||
|
||||
cells.c[cellId].forEach(neibCellId => {
|
||||
if (usedCells[neibCellId]) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue