public int TurningOnLights(int fromX, int fromY, int toX, int toY) { var grid = new BinaryLightingGrid(); grid.ProcessInstruction("turn on", fromX, fromY, toX, toY); return(grid.HowManyLightsAreLit()); }
public void ItsDarkOnStart() { var grid = new BinaryLightingGrid(); var lightsCount = grid.HowManyLightsAreLit(); Assert.That(lightsCount, Is.EqualTo(0)); }
public void CanReset() { var grid = new BinaryLightingGrid(); grid.ProcessInstruction("turn on", 1, 1, 5, 5); var lightsCount = grid.HowManyLightsAreLit(); Assert.That(lightsCount, Is.EqualTo(25)); grid.Reset(); lightsCount = grid.HowManyLightsAreLit(); Assert.That(lightsCount, Is.EqualTo(0)); }