public NumberItem Copy() { NumberItem ni = new NumberItem(); foreach (int a in nums) { ni.Add(a); } return(ni); }
public void TestRecord() { if (backgroundWorker1.CancellationPending) { return; } ni.Clear(); foreach (int i in record) { ni.Add(i); } if (ni.Count > 0 && !ni.TestNumberInRange(0, 1, 10)) { return; } if (ni.Count > 1 && !ni.TestNumberInRange(1, 4, 25)) { return; } if (ni.Count > 2 && !ni.TestNumberInRange(2, 6, 26)) { return; } if (ni.Count > 3 && !ni.TestNumberInRange(3, 17, 31)) { return; } if (ni.Count > 4 && !ni.TestNumberInRange(4, 22, 35)) { return; } //if (ni.Count > 5 && !ni.TestNumberInRange(5, 32, 49)) // return; if (ni.Count == 6) { if (ni.Number(5) - ni.Number(0) < 11) { return; } } if (!TestNumberInRange(ni.Sum(), 68, 130)) { return; } NumberItem ni2 = ni.Derivation(1); NumberItem ni3 = ni2.Derivation(1); if (ni3.CountOfLessThan(0) != 2) { return; } lock (progText) { progText = ni.ToString(); } list.Add(ni.Copy()); gens++; countTotal++; }