import importlib
ssl = importlib.import_module('sudoku-solver-logic')
Build3x3IndexedThermos = ssl.SquareSudokuPuzzle(
3,
"Blank 3x3 sudoku to build Indexed Thermos",
{},
{
'IndexedThermos': {
'Constraints': [ssl.IndexedThermo,],
'Sets': {
**{r: [(r, c) for c in ssl.Standard3x3SudokuGrid.columns] for r in ssl.Standard3x3SudokuGrid.rows},
**{c+ssl.Standard3x3SudokuGrid.size: [(r, c) for r in ssl.Standard3x3SudokuGrid.rows] for c in ssl.Standard3x3SudokuGrid.columns}
}
},
'IndexedThermosNonOverlapping': {
'Constraints': [ssl.Standard3x3SudokuGrid.IndexedThermosValidation,],
'Sets': {
1: [
*[(r, 1) for r in ssl.Standard3x3SudokuGrid.rows],
*[(r, ssl.Standard3x3SudokuGrid.size) for r in ssl.Standard3x3SudokuGrid.rows],
*[(1, c) for c in ssl.Standard3x3SudokuGrid.columns],
*[(ssl.Standard3x3SudokuGrid.size, c) for c in ssl.Standard3x3SudokuGrid.columns],
]
}
},
},
{},
debug = 0,
debug_step = 0,
)
Build3x3IndexedThermos.BuildIndexedThermos(0, 11, 'C')