store values as bigints to prevent floating point drift

This commit is contained in:
Evan
2025-02-28 18:45:12 -08:00
parent 9b85651ad8
commit d726fd66b5
4 changed files with 55 additions and 31 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ export class PlayerExecution implements Execution {
}
const popInc = this.config.populationIncreaseRate(this.player);
this.player.addWorkers(popInc * (1 - this.player.targetTroopRatio())); // (1 - this.player.targetTroopRatio()))
this.player.addWorkers(popInc * (1 - this.player.targetTroopRatio()));
this.player.addTroops(popInc * this.player.targetTroopRatio());
this.player.addGold(this.config.goldAdditionRate(this.player));
const adjustRate = this.config.troopAdjustmentRate(this.player);