mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 09:05:04 +00:00
Give test players tiles so it doesn't fail on isAlive check
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user