bugfix: make sure to add teams before assigning players, this caused all team games to have only two teams

This commit is contained in:
evan
2025-04-27 20:39:17 -07:00
parent ff4e1a4e4f
commit eed489a551
+1 -1
View File
@@ -85,7 +85,6 @@ export class GameImpl implements Game {
nationMap: NationMap,
private _config: Config,
) {
this.addHumans();
this._terraNullius = new TerraNulliusImpl();
this._width = _map.width();
this._height = _map.height();
@@ -112,6 +111,7 @@ export class GameImpl implements Game {
if (numPlayerTeams >= 8)
throw new Error(`Too many teams: ${numPlayerTeams}`);
}
this.addHumans();
}
private addHumans() {