public void Test1(string input, string expected) { var seafloor = Seafloor.Parse(input, default); seafloor.Increment(); Assert.Equal(Seafloor.Parse(expected, default), seafloor); }
public void Test2(string input, int steps, int expectedFlashCount) { var seafloor = Seafloor.Parse(input, default); while (steps-- > 0) { seafloor.Increment(); } Assert.Equal(expectedFlashCount, seafloor.FlashCount); }
public void Test3(string input, int expected) { var actual = 0; var seafloor = Seafloor.Parse(input, default); do { actual++; seafloor.Increment(); }while (seafloor.Values.Any(i => i > 0)); Assert.Equal(expected, actual); }