Procedures

ProcedureLocationProcedure TypeDescription
cli_solver sudoku Subroutine

Provides a solution for a puzzle passed by CLI:

Read more…
create_filled_grid sudoku Subroutine

Puzzle generators

Read more…
create_puzzle sudoku Subroutine

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

create_puzzle_with_unique_solution sudoku Subroutine

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.

display_grid sudoku Subroutine

Display a grid on the terminal.

initialize_random_number_generator sudoku Subroutine

System independent initialization of pseudo-random generator

Read more…
is_full sudoku Function

Returns true if the grid is full.

list_possible_digits sudoku Subroutine

Procedure to create a list of allowed digits in the present empty cell.

read_grid sudoku Subroutine

Read a grid from a provided the path to a file

request_grid sudoku Subroutine
save_grid sudoku Subroutine

Input/Output routines

Read more…
solve_puzzle sudoku Subroutine

Receives a puzzle grid and solves it.

sort sudoku Subroutine

Solver routines

Read more…
valid_colum_or_row sudoku Function

Validation routines

Read more…
valid_digit sudoku Function

Returns true if the row, column and region of a digit are all valid:

valid_grid sudoku Function

Check if the whole grid is valid.

Read more…
valid_zone sudoku Function

Validation of a zone/region.

Read more…
call~~graph~~CallGraph proc~cli_solver cli_solver proc~display_grid display_grid proc~cli_solver->proc~display_grid proc~read_grid read_grid proc~cli_solver->proc~read_grid proc~solve_puzzle solve_puzzle proc~cli_solver->proc~solve_puzzle proc~valid_grid valid_grid proc~cli_solver->proc~valid_grid proc~create_filled_grid create_filled_grid proc~valid_digit valid_digit proc~create_filled_grid->proc~valid_digit proc~create_puzzle create_puzzle proc~create_puzzle->proc~solve_puzzle 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 proc~initialize_random_number_generator initialize_random_number_generator proc~is_full is_full proc~request_grid request_grid proc~save_grid save_grid proc~solve_puzzle->proc~list_possible_digits proc~sort sort proc~solve_puzzle->proc~sort proc~valid_colum_or_row valid_colum_or_row proc~valid_digit->proc~valid_colum_or_row proc~valid_zone valid_zone proc~valid_digit->proc~valid_zone proc~valid_grid->proc~valid_colum_or_row proc~valid_grid->proc~valid_zone
Help