// sudoku.c (371, 1) // sudokuSolve(sud) as int // sudokuSolve(L_SUDOKU *) as l_int32 /// <summary> /// sudokuSolve() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/sudokuSolve/*"/> /// <param name="sud">[in] - l_sudoku starting in initial state</param> /// <returns>1 on success, 0 on failure to solve note reversal of typical unix returns</returns> public static int sudokuSolve( L_Sudoku sud) { if (sud == null) { throw new ArgumentNullException("sud cannot be Nothing"); } int _Result = Natives.sudokuSolve(sud.Pointer); return(_Result); }
// sudoku.c (854, 1) // sudokuOutput(sud, arraytype) as int // sudokuOutput(L_SUDOKU *, l_int32) as l_int32 /// <summary> /// (1) Prints either the initial array or the current state /// of the solution. /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/sudokuOutput/*"/> /// <param name="sud">[in] - l_sudoku at any stage</param> /// <param name="arraytype">[in] - L_SUDOKU_INIT, L_SUDOKU_STATE</param> /// <returns>void</returns> public static int sudokuOutput( L_Sudoku sud, int arraytype) { if (sud == null) { throw new ArgumentNullException("sud cannot be Nothing"); } int _Result = Natives.sudokuOutput(sud.Pointer, arraytype); return(_Result); }
// sudoku.c (337, 1) // sudokuDestroy(psud) as Object // sudokuDestroy(L_SUDOKU **) as void /// <summary> /// sudokuDestroy() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/sudokuDestroy/*"/> /// <param name="psud">[in,out] - to be nulled</param> public static void sudokuDestroy( ref L_Sudoku psud) { IntPtr psudPtr = IntPtr.Zero; if (psud != null) { psudPtr = psud.Pointer; } Natives.sudokuDestroy(ref psudPtr); if (psudPtr == IntPtr.Zero) { psud = null; } else { psud = new L_Sudoku(psudPtr); }; }