mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 22:37:31 +00:00
spawn
This commit is contained in:
@@ -16,7 +16,8 @@ function addPlayer(game: Game, tile: TileRef): Player {
|
||||
const info = new PlayerInfo("test", PlayerType.Human, null, "test_id");
|
||||
game.addPlayer(info);
|
||||
game.addExecution(new SpawnExecution("game_id", info, tile));
|
||||
while (game.inSpawnPhase()) game.executeNextTick();
|
||||
game.executeNextTick(); // init SpawnExecution
|
||||
game.executeNextTick(); // tick SpawnExecution → player gets territory
|
||||
return game.player(info.id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user