public static void doCheck() { matrix m = new matrix(width, height, matrixgrid.serialise()); var check = m.checkGrid(); applyCheck(check.Item1); }
public static void solve() { matrix m = new matrix(width, height, matrixgrid.serialise()); //check its possible to start with var test = m.checkGrid(true, true); if (test.Item2 == false) { MessageBox.Show("There are errors in the puzzle to start with, impossible to solve"); return; } bool possible = m.solveHead(); if (possible == false) { MessageBox.Show("No solutions found"); return; } deSerialise(m); var check = m.checkGrid(); applyCheck(check.Item1); }