create_puzzle Subroutine

public subroutine create_puzzle(grid, givens)

Creates a puzzle by brute force. But we are not 100% sure that the solution is unique (just a “high” probability).

Arguments

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

Sudoku grid.

integer, intent(in) :: givens

Number of given digits in the puzzle.


Calls

proc~~create_puzzle~~CallsGraph proc~create_puzzle create_puzzle proc~solve_puzzle solve_puzzle proc~create_puzzle->proc~solve_puzzle proc~list_possible_digits list_possible_digits proc~solve_puzzle->proc~list_possible_digits proc~sort sort proc~solve_puzzle->proc~sort

Variables

Type Visibility Attributes Name Initial
integer, public :: col
integer, public, dimension(9, 9) :: grid0
integer, public :: i
integer, public, parameter :: n = 1000
real, public :: r(2)
integer, public :: row
integer, public, dimension(:, :, :), allocatable :: solutions
logical, public :: unique