Browse Source

Force max flights per star

master
xyrex 4 years ago
parent
commit
a1ae42c86f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      strategies/simple.go

+ 3
- 1
strategies/simple.go View File

@@ -11,9 +11,11 @@ type SimpleStrategy struct {
}

func (s *SimpleStrategy) Execute(stars[] models.Star, flights[] models.Flight, links[] models.Link) {
total := 0

for i, s := range stars {
// Maximum flights per star per round is 3
total := 0

// Check if source star is already in flight
inFlight := false
for _, f := range flights {

Loading…
Cancel
Save