예제 #1
0
        //This method deposits all of the orbs it can into a given well.
        public bool DepositOrbs(Well well)
        {
            bool completed = false;

            foreach (int orb in Orbs.ToList())
            {
                if (orb == well.Orbs)
                {
                    if (well.Orbs == 5)
                    {
                        completed = true;
                    }
                    else
                    {
                        well.Orbs++;
                    }
                    IncrementScore();
                    Orbs.Remove(orb);
                    well.TicksLeft = ParentGame.WellDestabFreq;
                }
            }
            return(completed);
        }
예제 #2
0
        //This method deposits all of the orbs it can into a given well.
        public bool DepositOrbs(Well well)
        {
            bool completed = false;

            foreach (int orb in Orbs.ToList())
            {
                if (orb == well.Orbs && (!well.IsGhost || this == well.Owner))
                {
                    if (well.Orbs == 5)
                    {
                        completed = true;
                    }
                    well.Orbs++;
                    IncrementScore();
                    Orbs.Remove(orb);
                    well.TicksLeft = ParentGame.WellDestabFreq;
                }
            }
            if (well.Orbs == 6)
            {
                well.Orbs = 5;
            }
            return(completed);
        }