# board


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

------------------------------------------------------------------------

<a href="https://github.com/emagri/sudoku/blob/main/sudoku/board.py#L16"
target="_blank" style="float:right; font-size:smaller">source</a>

### Solution

>  Solution (*values)

*Result of puzzle solution by solver*

------------------------------------------------------------------------

<a href="https://github.com/emagri/sudoku/blob/main/sudoku/board.py#L25"
target="_blank" style="float:right; font-size:smaller">source</a>

### Board

>  Board (initial_cells)

*Initializes the board given the initial cell state*

<table>
<thead>
<tr>
<th></th>
<th><strong>Details</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>initial_cells</td>
<td>initial cell state</td>
</tr>
</tbody>
</table>

------------------------------------------------------------------------

<a href="https://github.com/emagri/sudoku/blob/main/sudoku/board.py#L35"
target="_blank" style="float:right; font-size:smaller">source</a>

### Board.show

>  Board.show (with_candidates=True)

*Gives a textual representation of the actual state of the board*

<table>
<colgroup>
<col style="width: 6%" />
<col style="width: 25%" />
<col style="width: 34%" />
<col style="width: 34%" />
</colgroup>
<thead>
<tr>
<th></th>
<th><strong>Type</strong></th>
<th><strong>Default</strong></th>
<th><strong>Details</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>with_candidates</td>
<td>bool</td>
<td>True</td>
<td>also shows candidate values for cells</td>
</tr>
</tbody>
</table>

------------------------------------------------------------------------

<a
href="https://github.com/emagri/sudoku/blob/main/sudoku/board.py#L272"
target="_blank" style="float:right; font-size:smaller">source</a>

### Board.solve

>  Board.solve (use_brute_force=False, print_log=False, print_results=True,
>                   check_many_solutions=False)

*Tries to solve the board given its current state*

<table>
<colgroup>
<col style="width: 6%" />
<col style="width: 25%" />
<col style="width: 34%" />
<col style="width: 34%" />
</colgroup>
<thead>
<tr>
<th></th>
<th><strong>Type</strong></th>
<th><strong>Default</strong></th>
<th><strong>Details</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>use_brute_force</td>
<td>bool</td>
<td>False</td>
<td>if methods based on logic fail, solve the puzzle traying all values
for the remaining cells</td>
</tr>
<tr>
<td>print_log</td>
<td>bool</td>
<td>False</td>
<td>print logs</td>
</tr>
<tr>
<td>print_results</td>
<td>bool</td>
<td>True</td>
<td>print final board</td>
</tr>
<tr>
<td>check_many_solutions</td>
<td>bool</td>
<td>False</td>
<td>do not stop after first solution; if more than one solution exist,
report it</td>
</tr>
<tr>
<td><strong>Returns</strong></td>
<td><strong>Solution</strong></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
