2024-12-07 19:23:45 +01:00
|
|
|
package solver
|
|
|
|
|
2025-01-25 19:45:31 +01:00
|
|
|
import (
|
|
|
|
"sync/atomic"
|
2025-01-28 00:07:06 +01:00
|
|
|
|
|
|
|
"gitea.ligthert.net/golang/sudoku-funpark/controller"
|
2025-01-25 19:45:31 +01:00
|
|
|
)
|
2025-01-25 19:08:31 +01:00
|
|
|
|
2025-01-28 00:31:02 +01:00
|
|
|
// Solve a given Sudoku puzzle by iterating through all possible solutions.
|
2024-12-07 19:23:45 +01:00
|
|
|
type Solver struct {
|
2025-01-28 00:07:06 +01:00
|
|
|
Controller *controller.Controller
|
|
|
|
row1s []int
|
|
|
|
row2s []int
|
|
|
|
row3s []int
|
|
|
|
row4s []int
|
|
|
|
row5s []int
|
|
|
|
row6s []int
|
|
|
|
row7s []int
|
|
|
|
row8s []int
|
|
|
|
row9s []int
|
|
|
|
Iter int64
|
|
|
|
counter atomic.Int64
|
|
|
|
rates []int64
|
2024-12-07 19:23:45 +01:00
|
|
|
}
|