NorthAmerica has panama canal, fixed ocean calculation for Oceania

This commit is contained in:
Evan
2024-12-12 21:00:10 -08:00
parent 939761fc76
commit 951585a8ed
5 changed files with 10 additions and 26115 deletions
+6 -1
View File
@@ -182,7 +182,12 @@ function packTerrain(map: Terrain[][]): Uint8Array {
}
function processOcean(map: Terrain[][]) {
const queue: Coord[] = [{ x: 0, y: 0 }];
const queue: Coord[] = [];
if (map[0][0].type == TerrainType.Water) {
queue.push({ x: 0, y: 0 })
} else {
queue.push({ x: map.length - 1, y: map[0].length - 1 })
}
const visited = new Set<string>();
while (queue.length > 0) {