This line makes Torque turn toward an enemy to attack it if: You might think it strange that Torque checks for two possible values of #enemy_h (the enemy's heading). Clearly there should only be one value of #enemy_h which means that the enemy is facing toward Torque. This is done because at this time, Torque doesn't know whether the enemy is to his left or his right. All Torque knows is that the enemy is on the same axis as it.

So, for example, if Torque is facing East and an enemy is detected on his x-axis, then the "same_x_ 2:" routine gets called. If the enemy is north of Torque and facing south, then it is facing toward Torque. Conversely, if the enemy is south of Torque and facing north, then it is still facing toward him. In this case, Torque checks that the enemy is not facing north or south before deciding to turn toward it.

All in all, this is about the best example of a cybug deciding when it is safe to attack and when to retreat with dignity. No-one else seems to have a better method.