Britbot
override bool Britbot.Simulator.BattleEvent.Activate ( SimulatedGame  sg) [inline, virtual]

Activates the event?

Parameters:
sg
Returns:

Implements Britbot.Simulator.SimulatedEvent.

Definition at line 39 of file BattleEvent.cs.

        {
            //check if the groups are oposing
            if (this._groupA.Owner != this._groupB.Owner)
            {
                //check fire power
                if (this._groupA.ActualFirePower() < this._groupB.ActualFirePower())
                {
                    this._groupA.Kill(sg);
                }
                else if (this._groupA.ActualFirePower() == this._groupB.ActualFirePower())
                {
                    this._groupA.Kill(sg);
                    this._groupB.Kill(sg);
                }
                else
                {
                    this._groupB.Kill(sg);
                }
            }

            return false;
        }