fixed invationCells spelling

Fixed invationCells to invasionCells.
Is invasion with s.
This commit is contained in:
Ángel Montero Lamas 2024-09-11 17:51:42 +02:00
parent d91fe8a8ef
commit f879b65664

View file

@ -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;