Reverted BFS changes, since they caused significant performance degradation

This commit is contained in:
Yair Morgenstern 2023-06-18 01:03:20 +03:00
parent 298771a72b
commit c823989c39

View File

@ -384,9 +384,7 @@ object NextTurnAutomation {
val cityWithLeastCostToBuy = highlyDesirableTile.value.minBy {
it.getCenterTile().aerialDistanceTo(highlyDesirableTile.key)
}
val bfs = BFS(cityWithLeastCostToBuy.getCenterTile(),
// Give higher priority on the way to intermediate tiles with higher ranking stats
{ Automation.rankStatsValue(it.stats.getTileStats(cityWithLeastCostToBuy, civInfo), civInfo).toInt() })
val bfs = BFS(cityWithLeastCostToBuy.getCenterTile())
{
it.getOwner() == null || it.getOwner() == civInfo
}