fix failing SAM test

This commit is contained in:
Evan
2025-04-18 14:26:19 -07:00
parent d66dcedcc2
commit 9de072c0c6
3 changed files with 43 additions and 58 deletions
+6 -2
View File
@@ -15,7 +15,6 @@ import { SAMMissileExecution } from "./SAMMissileExecution";
export class SAMLauncherExecution implements Execution {
private player: Player;
private mg: Game;
private sam: Unit;
private active: boolean = true;
private target: Unit = null;
@@ -32,7 +31,12 @@ export class SAMLauncherExecution implements Execution {
constructor(
private ownerId: PlayerID,
private tile: TileRef,
) {}
private sam: Unit | null = null,
) {
if (sam != null) {
this.tile = sam.tile();
}
}
init(mg: Game, ticks: number): void {
this.mg = mg;