Skip to content

Commit f4aaca2

Browse files
committed
Remove redundant delay
1 parent dc73692 commit f4aaca2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/core/execution/BotExecution.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export class BotExecution implements Execution {
88
private random: PseudoRandom;
99
private mg: Game;
1010
private neighborsTerraNullius = true;
11-
private initializationDelay = 0;
1211

1312
private behavior: BotBehavior | null = null;
1413
private attackRate: number;
@@ -35,8 +34,6 @@ export class BotExecution implements Execution {
3534
}
3635

3736
tick(ticks: number) {
38-
if (ticks < this.initializationDelay) return;
39-
4037
if (ticks % this.attackRate !== this.attackTick) return;
4138

4239
if (!this.bot.isAlive()) {
@@ -85,10 +82,7 @@ export class BotExecution implements Execution {
8582
}
8683
}
8784

88-
if (
89-
this.neighborsTerraNullius &&
90-
this.mg.ticks() > this.initializationDelay
91-
) {
85+
if (this.neighborsTerraNullius) {
9286
if (this.bot.sharesBorderWith(this.mg.terraNullius())) {
9387
this.behavior.sendAttack(this.mg.terraNullius());
9488
return;

0 commit comments

Comments
 (0)