public void TestEachSquare() { Board b = new Board(); b.EachGroup(4, 5, s => s.RemovePossiblity(5)); int[] possiblexy = { 3, 4, 5 }; b.EachSquare(s => { if (Array.IndexOf(possiblexy, s.Row) >= 0 && Array.IndexOf(possiblexy, s.Column) >= 0) { Assert.AreEqual(s.possibiltiesLeft.Count, 8); } else { Assert.AreEqual(s.possibiltiesLeft.Count, 9); } }); }
public void TestSingleGrid() { Board b = new Board(); b.EachGroup(0, s=> { if (s.Row == 1 && s.Column == 1) { } else { s.RemovePossiblity(5); } }); b.TestGridForSingleAvailible(); Assert.IsNotNull(b[1, 1].Value); Assert.AreEqual(5, b[1,1].Value); }