create game runner

This commit is contained in:
Evan
2025-01-02 13:25:36 -08:00
parent 8a4644637a
commit 8443095d89
10 changed files with 100 additions and 32 deletions
-12
View File
@@ -52,18 +52,6 @@ export class PathFinder {
)
}
public static Parallel(game: Game, worker: WorkerClient, numTicks: number, ...types: TerrainType[]): PathFinder {
if (types.length == 0) {
types = [TerrainType.Ocean]
}
return new PathFinder(
game,
(curr: Tile, dst: Tile) => {
return worker.createParallelAStar(curr, dst, numTicks, types)
}
)
}
nextTile(curr: Tile, dst: Tile, dist: number = 1): TileResult {
if (curr == null) {
consolex.error('curr is null')