Britbot

calculates how much time it would take for the given side to capture the island

Parameters:
capturerThe side (me or Enemy)
Returns:
number of turns till capture

Definition at line 54 of file SimulatedIsland.cs.

        {
            //calculate total number of turns to capture (without partials)
            int totalCaptureTime;
            //check if conqueror is the owner
            if (this.Owner == capturer)
            {
                totalCaptureTime = 0;
            } //if the isalnd is nutral
            else if (this.Owner == Consts.NO_OWNER)
            {
                totalCaptureTime = this.TurnsBeingCaptured;
            } //if the island is of the other team
            else
            {
                totalCaptureTime = 2 * this.TurnsBeingCaptured;
            }

            //check if we already have some capture time
            if (this.CapturingGroup.Owner == capturer)
            {
                return totalCaptureTime - this.TurnsBeingCaptured;
            }
            return totalCaptureTime;
        }