|
|
@@ -158,6 +158,11 @@ func (ls *LinkerStrategy) linkFriendlies(stars []*models.Star, flights []models. |
|
|
|
func (ls *LinkerStrategy) sendHomiesBack(stars []*models.Star, flights []models.Flight, links []models.Link) { |
|
|
|
for _, s := range stars { |
|
|
|
if s.OwnedByMe() && s.Captured() && ls.insufficientShipsForCapturing(s) && s.FlightsAllowed > 0 { |
|
|
|
|
|
|
|
if s.Ships <= 5 { |
|
|
|
continue |
|
|
|
} |
|
|
|
|
|
|
|
richnessRoundsToCapture := capturingShipThreshold / s.Richness |
|
|
|
|
|
|
|
if richnessRoundsToCapture == 0 { |
|
|
@@ -169,7 +174,7 @@ func (ls *LinkerStrategy) sendHomiesBack(stars []*models.Star, flights []models. |
|
|
|
distanceToOrigin := flightTurnDistance(capturingStar, s) |
|
|
|
if distanceToOrigin < timeToCapture { |
|
|
|
s.FlightsAllowed-- |
|
|
|
fmt.Printf("fly %d %d %d\n", s.Idx, capturingStar.Idx, s.Ships) |
|
|
|
fmt.Printf("fly %d %d %d\n", s.Idx, capturingStar.Idx, s.Ships - 3) |
|
|
|
} |
|
|
|
} |
|
|
|
} |