Boy, am I going to have some 'splainin' to do.

So I made a relatively complex system (which is begging to be refined)
which has the AI mandate a unit to build. currently it is not
implemented (thats the next step) but now it does some simple logic and
some more complex analysis. let me explain:

First, it checks if there are enough inf/mech on the field. if there are
less than three, it mandates them to be made. likewise it checks to see
if there are APCs/TChoppers (no lander functionality yet). then, it
calls a method which gives a general census of how the AI is doing in
the sea, air and ground. Based on some fuzzy logic, it counts the number
of enemy offensive units and gives them a value (ex. if there are 2
enemies with 3 bombers and 2 fighters, the enemy air forces would be
(3*5 + 2*5)/2, ~13.5). then, the AI's units are scored in their ability
to defend against the units (ex. cont.: if the AI has 2 AntiAir and a
missile unit, their score would be 15). comparing the two scores yields
an advantage number (ex. 15-13.5 = 1.5). The three areas of combat are
sorted based on their advantage number, with the lowest one first. If
the number is negative, it means that the AI has the disadvantage, and
they need to mandate def. units for that particular case (ex. build an
antiAir if the enemy has the air advantage). Then in a weighted random
arr, the order of importance is created, with the case of greatest
disadvantage likely happening first. THEN based of that sorted list, a
random unit that matches that case is mandated (ex. if we need better
air def, we may randomly choose a AntiAir, Missile, or Fighter unit).
Once the mandated unit is selected, it is then appended to the list of
mandated units.

Im curious how the unit selection will work out, currently it only
mandates one unit, which isnt probably optimal considering the case with
lots of funds, perhaps checking when there is a lot of funds per turn
gained to make more units would be in order. Also, there needs to be
some idea of when the unit would be built so the AI doesn't save up for
several turns for something they don't need, so using that would further
be necessary.

boy, that was tedious. Lets hope it sticks to the wall.