Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public static List <KnightSection> GetBeforeNo1Section(int m)
        {
            MillionConfig        config    = LoadMillionConfig();
            Strongest            strongest = GetBeforeNo1(config, m);
            List <KnightSection> result    = new List <KnightSection>();

            foreach (string val in strongest.Knights)
            {
                result.Add(new KnightSection(val));
            }
            return(result);
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="data"></param>
        /// <param name="sections"></param>
        /// <param name="m"></param>
        /// <returns></returns>
        private static MillionConfig GetMillionConfig(IntegrationDto data, List <KnightSection> sections, int m)
        {
            MillionConfig config    = LoadMillionConfig();
            Strongest     strongest = GetBeforeNo1(config, m);

            strongest.Attack   = data.Atack;
            strongest.Hitpoint = data.HitPoint;
            strongest.Cost     = data.Cost;
            strongest.Knights  = new string[sections.Count()];
            for (int i = 0; i < sections.Count(); i++)
            {
                strongest.Knights[i] = sections[i].KnightName;
            }
            strongest.ComboList = new string[data.Combo.Count()];
            for (int i = 0; i < data.Combo.Count(); i++)
            {
                strongest.ComboList[i] = data.Combo[i].Name;
            }
            return(config);
        }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public static IntegrationDto GetBeforeNo1(int m)
        {
            MillionConfig  config    = LoadMillionConfig();
            Strongest      strongest = GetBeforeNo1(config, m);
            IntegrationDto dto       = new IntegrationDto();

            dto.Atack = strongest.Attack;
            dto.Cost  = strongest.Cost;
            if (dto.Cost == 0)
            {
                dto.Cost = 999;
            }
            dto.HitPoint = strongest.Hitpoint;
            dto.Combo    = new List <ComboDto>();
            foreach (string val in strongest.ComboList)
            {
                ComboDto data = new ComboDto();
                data.Name = val;
                dto.Combo.Add(data);
            }
            return(dto);
        }
Пример #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        private static Strongest GetBeforeNo1(MillionConfig config, int m)
        {
            Strongest strongest = new Strongest();;

            if (m == 3)
            {
                strongest = config.Strongest3;
            }
            if (m == 6)
            {
                strongest = config.Strongest6;
            }
            if (m == 9)
            {
                strongest = config.Strongest9;
            }
            if (m == 12)
            {
                strongest = config.Strongest12;
            }
            return(strongest);
        }