create troop slider

This commit is contained in:
Evan
2024-11-03 12:37:56 -08:00
parent df0b5a91ac
commit 2afecf0f39
17 changed files with 2673 additions and 2401 deletions
+7 -5
View File
@@ -1,7 +1,7 @@
import {Config} from "../configuration/Config"
import {Execution, MutableGame, MutablePlayer, Player, PlayerID, TerraNullius, Tile} from "../game/Game"
import {bfs, calculateBoundingBox, getMode, inscribed, simpleHash} from "../Util"
import {GameImpl} from "../game/GameImpl"
import { Config } from "../configuration/Config"
import { Execution, MutableGame, MutablePlayer, Player, PlayerID, TerraNullius, Tile } from "../game/Game"
import { bfs, calculateBoundingBox, getMode, inscribed, simpleHash } from "../Util"
import { GameImpl } from "../game/GameImpl"
export class PlayerExecution implements Execution {
@@ -30,7 +30,9 @@ export class PlayerExecution implements Execution {
if (ticks < this.config.numSpawnPhaseTurns()) {
return
}
this.player.setTroops(this.config.troopAdditionRate(this.player))
this.player.addManpower(this.config.manpowerAdditionRate(this.player))
this.player.addGold(this.config.goldAdditionRate(this.player))
this.player.addTroops(this.config.troopAdjustmentRate(this.player))
const alliances = Array.from(this.player.alliances())
for (const alliance of alliances) {