#' @title Test la solution du Suduko si elle est valide ou non
#'
#'
#'@param A : une matrice
#'@return : True si la solution est valide, sinon False
#'@author AIT MOULAY ABDERRAHIM
#'@examples
#' A = Suduko()
#' A= genererSoduko(A,50)
#' TestSuduko (A)
#'@export
#'
TestSuduko <- function(A){
for(i in 1:9)
for (j in 1:9 ) {
k = A[i,j]
B = A
B [i,j] <- NA
if(isFALSE( is_valid(B,i,j,k) ) ) return(FALSE)
}
return(TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.