AStar returns cell instead of path

This commit is contained in:
evanpelle
2024-12-03 14:35:09 -08:00
parent 330b6b93cb
commit 4edd66dc1f
12 changed files with 57 additions and 59 deletions
+2 -1
View File
@@ -16,7 +16,7 @@ export class NukeExecution implements Execution {
private nuke: MutableUnit
private dst: Tile
private pathFinder: PathFinder = PathFinder.Serial(10_000, () => true)
private pathFinder: PathFinder
constructor(
private type: UnitType.AtomBomb | UnitType.HydrogenBomb,
private senderID: PlayerID,
@@ -26,6 +26,7 @@ export class NukeExecution implements Execution {
init(mg: MutableGame, ticks: number): void {
this.mg = mg
this.pathFinder = PathFinder.Serial(mg, 10_000, () => true)
this.player = mg.player(this.senderID)
this.dst = this.mg.tile(this.cell)
}