refactor: drawCoastline

This commit is contained in:
Azgaar 2024-09-06 02:37:44 +02:00
parent 088faf9e26
commit ec236d146b
2 changed files with 14 additions and 25 deletions

View file

@ -159,6 +159,11 @@ function connectVertices({vertices, startingVertex, ofSameType, addToChecked, cl
else if (v2 !== previous && c2 !== c3) next = v2;
else if (v3 !== previous && c1 !== c3) next = v3;
if (!vertices.c[next]) {
ERROR && console.error("ConnectVertices: next vertex is out of bounds");
break;
}
if (next === current) {
ERROR && console.error("ConnectVertices: next vertex is not found");
break;