mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 11:31:21 +00:00
NorthAmerica has panama canal, fixed ocean calculation for Oceania
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user