Testing the update function of AttackGraph.
Refactored update function to run one loop less.