public void DistinctGroupsReturnsZeroWithAllUnknowns() { Nonogram n = new Nonogram(5, 1); CellLine l = n.Row(0); Assert.AreEqual(0, l.DistinctGroups()); }
public void DistinctGroupsReturnsOneWithAllFilled() { Nonogram n = new Nonogram(5, 1); CellLine l = n.Row(0); l.Fill(Cell.CellState.Filled); Assert.AreEqual(1, l.DistinctGroups()); }
public void DistinctGroupsReturnsZeroWithAllBlank() { Nonogram n = new Nonogram(5, 1); CellLine l = n.Row(0); l.Fill(Cell.CellState.Blank); Assert.AreEqual(0, l.DistinctGroups()); }
public void DistinctGroupsReturnsActualNumberOfGroupsWithThreeGroupsOfOne() { Nonogram n = new Nonogram(5, 1); CellLine l = n.Row(0); l[0].State = l[2].State = l[4].State = Cell.CellState.Filled; l[1].State = l[3].State = Cell.CellState.Blank; Assert.AreEqual(3, l.DistinctGroups()); }
public void DistinctGroupsReturnsActualNumberOfGroupsWithTwoGroupsOfTwo() { Nonogram n = new Nonogram(5, 1); CellLine l = n.Row(0); l.Fill(Cell.CellState.Filled); l[2].State = Cell.CellState.Blank; Assert.AreEqual(2, l.DistinctGroups()); }