Britbot
int Britbot.SmartIsland.RealTimeTillCapture ( int  conqueror) [inline]

This returns how many turns it would take for the conqueror team to capture the island considering everything? (the owner and if there was some capturing before)

Parameters:
conquerorthe team we ask about (see Consts)
Returns:
how many turns it would take for the conqueror team to capture the island

Definition at line 470 of file SmartIsland.cs.

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

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