Integrating the AI module

This next step is to simply take the AI routines that were written earlier, and splice them into the game. The easiest way is like this:

'Transfer values TO local variables
RD = Int(CShip(CurrentShipToMove - 25, 1))
RandomLock = Int(CShip(CurrentShipToMove - 25, 2))
SlopeCount = Int(CShip(CurrentShipToMove - 25, 3))
GoodCount = Int(CShip(CurrentShipToMove - 25, 4))
Maxtrack = Int(CShip(CurrentShipToMove - 25, 5))
SXI = CShip(CurrentShipToMove - 25, 6)
SYI = CShip(CurrentShipToMove - 25, 7)
SX = Ship(CurrentShipToMove, 1)
SY = Ship(CurrentShipToMove, 2)
TX = Ship(Ship(CurrentShipToMove, 8), 1)
TY = Ship(Ship(CurrentShipToMove, 8), 2)

...Run the routine, and then...

'Transfer values FROM local variables
CShip(CurrentShipToMove - 25, 1) = RD
CShip(CurrentShipToMove - 25, 2) = RandomLock
CShip(CurrentShipToMove - 25, 3) = SlopeCount
CShip(CurrentShipToMove - 25, 4) = GoodCount
CShip(CurrentShipToMove - 25, 5) = Maxtrack
CShip(CurrentShipToMove - 25, 6) = SXI
CShip(CurrentShipToMove - 25, 7) = SYI
Ship(CurrentShipToMove, 1) = SX
Ship(CurrentShipToMove, 2) = SY

The routine we (do I have a mouse in my pocket?) wrote earlier only moves the ships toward their targets.  That's the easy part, next, they need to choose targets and make tactical decisions.  Here's where we're at:

The current project and source code