use tiles to improve perf

This commit is contained in:
evanpelle
2024-08-10 19:35:31 -07:00
parent f7b0441f41
commit dd94bb4c65
8 changed files with 64 additions and 54 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ export class BotExecution implements Execution {
constructor(private bot: MutablePlayer) {
this.random = new PseudoRandom(bot.id())
this.attackRate = this.random.nextInt(50, 200)
this.attackRate = this.random.nextInt(10, 50)
}
init(gs: MutableGame, ticks: number) {
@@ -35,7 +35,7 @@ export class BotExecution implements Execution {
const toAttack = ns[this.random.nextInt(0, ns.length)]
this.gs.addExecution(new AttackExecution(
this.bot.troops() / 5,
this.bot.troops() / 100,
this.bot.id(),
toAttack.isPlayer() ? toAttack.id() : null,
null