internal PlanetArmada Clone()
        {
            PlanetArmada result = new PlanetArmada(PlanetUnderAttack);

            result.AddRange(this);
            return(result);
        }
Example #2
0
        // Synchronizes the with game status.
        internal void SynchronizeWithGameStatus(int ownerId, int numShips)
        {
            owner     = ownerId;
            _NumShips = numShips;
            ShipCountAtStartOfTurn       = numShips;
            ShipsRequiredToSurviveAttack = -1;
            MaxDesertersAllowed          = -1;
            DoesNotChangeOwner           = true;
            AttackMovesAllowed           = true;
            Armada = new PlanetArmada(this);

            IsUnderAttack       = false;
            IsMine              = owner == 1;
            IsNeutral           = owner == 0;
            IsEnemy             = !IsMine && !IsNeutral;
            WinningArmadaIsMine = IsMine;
        }