Attack Handler

The AttackHandler modules is responsible for coordinating attackers.

Units tasked with attacking are given an attacker behaviour. This behaviour contacts the AttackHandler, indicating it is ready for recruitment. When enough units have been recruited, the AttackHandler removes them from the list and determines an attack target. The units are then sent to the target.

When units complete their orders, they contact the AttackHandler for recruitment, beginning the cycle again.

As a module, the AttackHandler is responsible for coordinating and deciding the target for attack, but it isn’t responsible for managing individual attackers. That is the responsibility of behaviours