Browse Source

Some more sanity checks

master
Khaled Nassar 4 years ago
parent
commit
825bfe2001
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      strategies/linker.go

+ 5
- 5
strategies/linker.go View File

@@ -113,11 +113,6 @@ func (ls *LinkerStrategy) linkFriendlies(stars []*models.Star, flights []models.
continue
}

// The source is lower than the destination, so skip it
if src.Y > dst.Y {
continue
}

// We only want to map to friendlies, not own
if !dst.Friendly() {
continue
@@ -171,6 +166,11 @@ func (ls *LinkerStrategy) sendHomiesBack(stars []*models.Star, flights []models.

timeToCapture := s.Turns + (richnessRoundsToCapture - 1) * 5
capturingStar := stars[s.CapturedBy]

if !ls.insufficientShipsForCapturing(capturingStar) {
continue
}

distanceToOrigin := flightTurnDistance(capturingStar, s)
if distanceToOrigin < timeToCapture {
s.FlightsAllowed--

Loading…
Cancel
Save