Example #1
0
        public Secret[] GetDefaultSecrets(HeroClass heroClass)
        {
            var count      = SecretHelper.GetMaxSecretCount(heroClass);
            var returnThis = new Secret[count];

            for (int i = 0; i < count; i++)
            {
                returnThis[i] = new Secret(SecretHelper.GetSecretIds(heroClass)[i], 1);
            }
            return(returnThis);
        }
Example #2
0
        public List <Secret> GetDefaultSecrets(HeroClass heroClass)
        {
            var count      = SecretHelper.GetMaxSecretCount(heroClass);
            var returnThis = new List <Secret>();

            foreach (var cardId in SecretHelper.GetSecretIds(heroClass))
            {
                returnThis.Add(new Secret(cardId, 1));
            }

            return(returnThis);
        }
Example #3
0
        public void NewSecretPlayed(HeroClass heroClass, int id, int turn, string knownCardId = null)
        {
            var helper = new SecretHelper(heroClass, id, turn);

            if (knownCardId != null)
            {
                foreach (var cardId in SecretHelper.GetSecretIds(heroClass))
                {
                    helper.PossibleSecrets[cardId] = cardId == knownCardId;
                }
            }
            Secrets.Add(helper);
            Logger.WriteLine("Added secret with id:" + id, "OpponentSecrets");
        }
        public void NewSecretPlayed(HeroClass heroClass, int id, int turn, string knownCardId = null)
        {
            var helper = new SecretHelper(heroClass, id, turn);

            if (knownCardId != null)
            {
                foreach (var cardId in SecretHelper.GetSecretIds(heroClass))
                {
                    helper.TrySetSecret(cardId, cardId == knownCardId);
                }
            }
            Secrets.Add(helper);
            Log.Info("Added secret with id:" + id);
        }
Example #5
0
        public Secret[] GetSecrets()
        {
            var count      = SecretHelper.GetMaxSecretCount(HeroClass);
            var returnThis = new Secret[count];

            for (int i = 0; i < count; i++)
            {
                returnThis[i] = new Secret(SecretHelper.GetSecretIds(HeroClass)[i], 0);
            }
            foreach (var secret in Secrets)
            {
                for (int i = 0; i < count; i++)
                {
                    if (secret.PossibleSecrets[i])
                    {
                        returnThis[i].Count++;
                    }
                }
            }
            return(returnThis);
        }
Example #6
0
 public List <Secret> GetDefaultSecrets(HeroClass heroClass)
 {
     return(SecretHelper.GetSecretIds(heroClass).Select(cardId => new Secret(cardId, 1)).ToList());
 }