sudoku v1.0.1 Sudoku.Board

Summary

Functions

Update board and assign value to square x,y - this in turn will cause the value to be eliminated from squares in all other units containing this square

Apply fixed assignments to a board, from a bitstring

Update board and eliminate elim_values from list of squares elim_from

Return the key used to store a given square in our squares map

Create a new board and do initial assignment and population from fixed clues

Find all the other squares in all units that contain the given square. Excludes the given square from the results returned

Test if the board is solved? Every square should have a value for solution

Convert the board to a text representation

Ensure that the board is valid? This simply means there is at least one candidate option for each cell

Functions

assign(board, x, y, value)

Update board and assign value to square x,y - this in turn will cause the value to be eliminated from squares in all other units containing this square

assign_board(board, initial)

Apply fixed assignments to a board, from a bitstring

Accepts any +venumber/letter as a symbol. 0, “.”, “” and anything else are considered a blank

eliminate(board, elim_from, elim_values)

Update board and eliminate elim_values from list of squares elim_from

key(x, y)

Return the key used to store a given square in our squares map

new()
new(initial)

Create a new board and do initial assignment and population from fixed clues

other_squares_in_units(board, target)

Find all the other squares in all units that contain the given square. Excludes the given square from the results returned.

solved?(board)

Test if the board is solved? Every square should have a value for solution

square_to_lists(square, per_unit)
to_string(board, format \\ :square)

Convert the board to a text representation

valid?(board)

Ensure that the board is valid? This simply means there is at least one candidate option for each cell