Initial commit

This commit is contained in:
2026-07-17 22:35:11 +02:00
parent 3121a7d818
commit 1ff0efb557
31 changed files with 895046 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
package strategies
import "git.kleiax.de/homepage/libs/sudoku/board"
// ────────────────────────────────────────────────────────────────────────────── //
// LAST_DIGIT STRUCTURE //
// ────────────────────────────────────────────────────────────────────────────── //
type LastDigit struct {
Base
}
func (ld *LastDigit) SearchProgressableCells() int {
ld.field.ForEachPart(func(part board.Part) {
missingNumbers := part.GetMissingNumbers()
if len(missingNumbers) == 1 {
// var emptyCell *Cell
// part.forEachCell(func(cell *Cell) {
// if cell.number == 0 {
// emptyCell = cell
// }
// })
// change := Change{
// cell: emptyCell,
// action: ActionSetNumber,
// value: missingNumbers[0],
// }
// ld.changes = append(ld.changes, change)
}
})
//fmt.Printf("LastDigit Changes %d", len(ld.changes))
return len(ld.changes)
}
func (ld *LastDigit) getName() string {
return "Last Digit - Letzte Zahl"
}
// ────────────────────────────────────────────────────────────────────────────── //
// CRP STRUCTURE //
// ────────────────────────────────────────────────────────────────────────────── //
type CRP struct {
Base
}
// ────────────────────────────────────────────────────────────────────────────── //
// SIMPLE_COLORING_T1 STRUCTURE //
// ────────────────────────────────────────────────────────────────────────────── //
type SimpleColoringT1 struct {
Base
}