Example #1
0
        /// <summary>
        /// Adds the same number of secret's to OpponentSecretZone, as there
        /// are in reality, from the given list of secrets.
        /// </summary>
        /// <param name="secrets"></param>
        void AddBlindSecrets(List <string> secrets)
        {
            for (int i = 0; i < BlindGame.CurrentOpponent.SecretZone.Count; ++i)
            {
                var  rnd    = new Random();
                int  rndInd = 0;
                Card secret;

                do
                {
                    rndInd = rnd.Next(secrets.Count);
                    secret = Cards.FromName(secrets.PopAt(rndInd));
                }while (OpponentSecretZone.Contains(secret));

                OpponentSecretZone.Add(new Spell(BlindGame.CurrentOpponent, secret, secret.Tags));
            }
        }
Example #2
0
        /// <summary>
        /// Fills the opponent's secret zone with possible secrets from the proper classes
        /// based on the real cards in the opponent's secret zone.
        /// </summary>
        /// <returns></returns>
        void AddBlindSecrets()
        {
            foreach (Spell s in BlindGame.CurrentOpponent.SecretZone)
            {
                List <string> secrets = GetSecrets(s.Card.Class);
                var           rnd     = new Random();
                int           rndInd  = 0;
                Card          secret;

                do
                {
                    rndInd = rnd.Next(secrets.Count);
                    secret = Cards.FromName(secrets.PopAt(rndInd));
                }while (OpponentSecretZone.Contains(secret));

                OpponentSecretZone.Add(new Spell(BlindGame.CurrentOpponent, secret, secret.Tags));
            }
        }