mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-17 14:09:15 +00:00
put methods onto terraintile
This commit is contained in:
@@ -53,7 +53,7 @@ function findPath(terrainMap: TerrainMap, miniTerrainMap: TerrainMap, req: Searc
|
||||
miniTerrainMap,
|
||||
terrainMap.terrain(req.start),
|
||||
terrainMap.terrain(req.end),
|
||||
(sn: SearchNode) => (sn as TerrainTile).terrainType() == TerrainType.Ocean,
|
||||
(sn: SearchNode) => (sn as TerrainTile).type() == TerrainType.Ocean,
|
||||
10_000,
|
||||
req.duration,
|
||||
);
|
||||
|
||||
@@ -117,7 +117,7 @@ export class ParallelAStar implements AStar {
|
||||
this.game.terrainMap(),
|
||||
this.game.terrainMiniMap(),
|
||||
this.src, this.dst,
|
||||
(t: TerrainTile) => t.terrainType() == TerrainType.Ocean,
|
||||
(t: TerrainTile) => t.type() == TerrainType.Ocean,
|
||||
100_000_000,
|
||||
20
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user