private CalcBackCell(GCSlot slot, uint seed)
 {
     this.prevCell     = RootCell.Instance;
     this.core         = new CalcBackCore(seed, slot);
     this.seed         = seed;
     this.tsvCondition = 0x10000;
 }
 private CalcBackCell(CalcBackCell cell, uint seed, uint tsv)
 {
     this.prevCell     = cell;
     this.core         = cell.core;
     this.seed         = seed;
     this.tsvCondition = tsv;
 }
        public IEnumerable <(uint seed, GCIndividual Individual)> CalcBack(uint h, uint a, uint b, uint c, uint d, uint s, bool deduplication = false)
        {
            foreach (var genSeed in SeedFinder.FindGeneratingSeed(h, a, b, c, d, s, false))
            {
                var stack = new Stack <(int Index, CalcBackCell Cell)>();
                stack.Push((preGeneratePokemons.Count, CalcBackCell.CreateCell(slot, genSeed)));
                var loopBreak = false;
                while (!loopBreak && stack.Count > 0)
                {
                    (var index, var cell) = stack.Pop();
                    if (index-- == 0)
                    {
                        // tsv判定.
                        if (!cell.CheckTSVGeneration())
                        {
                            continue;
                        }

                        yield return(cell.GetResult());

                        loopBreak = deduplication; // 重複を除く場合はloopBreakをtrueにしてループを抜ける.

                        continue;
                    }
                    foreach (var _c in cell.GetGeneratableCell(preGeneratePokemons[index]))
                    {
                        stack.Push((index, _c));
                    }
                }
            }
        }