Britbot

This function calculates this enemy group direction based on its last directions simply adds them up.

Returns:
The heading of this enemy group

Definition at line 551 of file EnemyGroup.cs.

        {
            //creating an accumulator heading vector with (0,0) values
            HeadingVector hv = new HeadingVector();

            //going over the last directions of this group and adding them up
            foreach (Direction dir in this._lastDirections)
            {
                //temporal variable for conversion
                HeadingVector currHeading = new HeadingVector(dir);
                hv += currHeading;
            }

            //return result
            return hv;
        }