public void WaitingArea_Puzzle1Ticks_HaveCorrectPatternResults(int numTicks, bool expectedTickResult, string expectedGrid) { var area = new WaitingArea(Example); bool?result = null; for (var k = 0; k < numTicks; ++k) { result = area.Puzzle1Tick(); } result.Should().Be(expectedTickResult); area.ToString().Should().Be(expectedGrid); }
public void WaitingArea_Example_Has37SeatsWhenStablePatternIsFound() { var area = new WaitingArea(Example); bool result; do { result = area.Puzzle1Tick(); } while (result is true); area.OccupiedSeats.Should().Be(37); }
public void Puzzle1_FindOccupiedSeatCount_AfterPatternStabilizes() { var area = new WaitingArea(Input.Day11); bool result; do { result = area.Puzzle1Tick(); } while (result is true); area.OccupiedSeats.Should().Be(2361); }