private static void TestRandomField(LifeJourney life) { life.GenerateRandomField(12345, 0.5); life.Step(); Assert.AreEqual(565797, life.GetLiveCellsCount()); Assert.AreEqual(-717568334, life.GetFingerprint()); life.Clear(); life.GenerateRandomField(12345, 0.1); life.Step(); Assert.AreEqual(98717, life.GetLiveCellsCount()); Assert.AreEqual(1237589375, life.GetFingerprint()); }
private static void TestSimpleFigureAtStart(LifeJourney life) { life.Clear(); life.SetRectangle(1, 1, @"-x- xxx -x-"); life.Step(); life.TestRectangle(1, 1, @"xxx- x-x- xxx- ----"); }
private static void TestSimpleFigure(LifeJourney life) { life.Clear(); life.SetRectangle(110, 110, @"-x- xxx -x-"); life.Step(); life.TestRectangle(109, 109, @"----- -xxx- -x-x- -xxx- -----"); }