package solver import ( "sync/atomic" "gitea.ligthert.net/golang/sudoku-funpark/controller" ) // Solve a given Sudoku puzzle by iterating through all possible solutions. type Solver struct { Controller *controller.Controller // Slice of possible blocks for the 1st row. row1s []int // Slice of possible blocks for the 2nd row. row2s []int // Slice of possible blocks for the 3rd row. row3s []int // Slice of possible blocks for the 4th row. row4s []int // Slice of possible blocks for the 5th row. row5s []int // Slice of possible blocks for the 6th row. row6s []int // Slice of possible blocks for the 7th row. row7s []int // Slice of possible blocks for the 8th row. row8s []int // Slice of possible blocks for the 9th row. row9s []int // Maximum number of possible solutions with the current set of rows. Iter int64 // Progress counter, needs atomic due to the number of updates. counter atomic.Int64 // Slice of rates for accurate duration estimation. rates []int64 }