andor9/tyrant_optimize — pull request #18 by mjdoom (2014-12-18 05:52:26+00:00)
Title: Add tw flag for simming guild war offense and defense simultaneously

Looking through the changes here there are some minor things like places where I added comments that I ended up not making changes in that area of the code in the end but all of the important stuff is in there and the cleanup is minor.

Fort strings had to become global to make this work without changing a bunch of function signatures but since these are only written once the change should be thread safe.

Indexing for the factors in compute_score in total war mode is currently broken, it just uses the first factor in all cases. This works fine if you don't use unbalanced factors but if someone actually uses that it will probably need to be fixed. Note that results are pushed back in alternating fashion (offense, defense, offense, defense, etc.) so it is just a matter of figuring out the correct math to get the correct 'findex'.