Skip to content

Commit

Permalink
feat: add tradingTransition phase
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel committed Aug 4, 2023
1 parent c449837 commit 8f9ab9f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/cli/lib/behavior/central_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,14 @@ class CentralCommand {
if (_shipCache.ships.length < 30) {
return GamePhase.early;
}
return GamePhase.ramp;
final traderCount = _shipCache.ships
.where((s) => s.registration.role == ShipRole.HAULER)
.length;
if (traderCount < 30) {
return GamePhase.ramp;
}
// When is GamePhase.exploring?
return GamePhase.tradingTransition;
}

/// Minimum profit per second we expect this ship to make.
Expand Down Expand Up @@ -333,6 +340,11 @@ class CentralCommand {
return Behavior.idle;
}
}
if (phase >= GamePhase.tradingTransition) {
if (ship.frame.symbol == ShipFrameSymbolEnum.MINER) {
return Behavior.idle;
}
}

// Only use the first 20 probes.
// const activeProbes = 20;
Expand Down

0 comments on commit 8f9ab9f

Please sign in to comment.