Пример #1
0
        private void SetResult()
        {
            if (Parent1 != null && Parent2 != null)
            {
                var dna = DNATables.GetChild(Parent1.Source.NameEng, Parent2.Source.NameEng);
                if (dna != null)
                {
                    _result = AllDigimons.FirstOrDefault(x => x.Source.NameEng == dna.DigimonChildId);
                }
            }


            //            if (Parent1 != null && Parent2 != null && AllOptions.Any())
            //            {
            //                var temp = AllOptions.FirstOrDefault(x => (Parent1 != Parent2 && x.Parents.Contains(Parent1) && x.Parents.Contains(Parent2))
            //                || (Parent1 == Parent2 &&  x.Parents.All(y => y == Parent1)));
            //                if (temp != null)
            //                    _result = temp.Result;
            //                else
            //                    _result = null;
            //            }
            //            else
            //            {
            //                _result = null;
            //            }
        }
Пример #2
0
        public void SpeedTest()
        {
            Stopwatch watch1 = new Stopwatch();

            watch1.Start();
            DNATables.CalculateAllDNAOptions();
            watch1.Stop();
            Console.WriteLine(watch1.Elapsed);
        }
Пример #3
0
 public static List <DigivolveDNAOptionVM> DigivolveDna(string child)
 {
     return(DNATables.GetAllOptions(child).Select(x => x.GetVM()).ToList());
 }
Пример #4
0
 public void AllOptionsTest()
 {
     var dnas = DNATables.GetAllOptions("Veemon");
 }