refactor: update IdleState to include periodic fuel checks and adjust sleep duration

This commit is contained in:
MayaTheShy
2026-02-20 04:04:01 -05:00
parent ec5f048d49
commit 989b6f9118

View File

@@ -13,12 +13,11 @@ export class IdleState extends BaseState {
}
async *act() {
// Send periodic status updates while idle
// Periodic fuel check while idle (no scanning — avoids rotating turtle)
while (!this.cancelled) {
await this.checkFuel();
await this.scanSurroundings();
yield;
await this._sleep(5000);
await this._sleep(10000);
}
}
}