tvwenger / maxfield

An Ingress Linking and Fielding Strategy Generator
http://www.ingress-maxfield.com/
GNU General Public License v3.0
106 stars 56 forks source link

Fix outgoing links count check for SBLA #14

Closed pwiecz closed 7 years ago

pwiecz commented 7 years ago

The check that the number of outgoing links is maximal was: ((a.node[p]['sbla'] and a.out_degree(p) >= 40) or (a.out_degree(p) >= 8)) which is incorrect, as the second clause, and thus the whole expression was evaluating to True if out_degree is >= 8. So essentially the SBLA flag was ignored. Fix this by extracting the correct reverse check from try_reduce_out_degree to a separate function, and using negation of this check when needed.

tvwenger commented 7 years ago

Thanks again