Give test players tiles so it doesn't fail on isAlive check

This commit is contained in:
variablevince
2025-10-27 23:06:17 +01:00
parent bd5654434a
commit 1b04403203
+7
View File
@@ -6,6 +6,7 @@ import {
UnitType,
} from "../src/core/game/Game";
import { setup } from "./util/Setup";
import { SpawnExecution } from "../src/core/execution/SpawnExecution";
let game: Game;
let player: Player;
@@ -24,6 +25,12 @@ describe("PlayerImpl", () => {
],
);
// Add spawn executions to give players territory
game.addExecution(
new SpawnExecution(game.player("player_id").info(), game.ref(0, 0)),
new SpawnExecution(game.player("other_id").info(), game.ref(20, 20)),
);
while (game.inSpawnPhase()) {
game.executeNextTick();
}