create_puzzle_with_unique_solution Subroutine

public subroutine create_puzzle_with_unique_solution(grid, nb_empty)

Creates a minimal puzzle. Digits are randomly removed one by one. The process ends when it is not possible anymore to remove a digit while keeping a unique solution. The number of remaining digits is therefore a priori unknown.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), dimension(9, 9) :: grid
integer, intent(out) :: nb_empty

Calls

proc~~create_puzzle_with_unique_solution~~CallsGraph proc~create_puzzle_with_unique_solution create_puzzle_with_unique_solution proc~list_possible_digits list_possible_digits proc~create_puzzle_with_unique_solution->proc~list_possible_digits

Variables

Type Visibility Attributes Name Initial
integer, public :: col
integer, public :: d
integer, public :: i
integer, public, dimension(81) :: list
integer, public :: n
integer, public :: n1
integer, public :: n2
integer, public :: nb_possible
real, public :: r(2)
integer, public :: row
integer, public :: temp