From a7c5845b7a01f7231ebbba4b587f3c280c581cc3 Mon Sep 17 00:00:00 2001 From: Sacha Ligthert Date: Tue, 28 Jan 2025 00:33:45 +0100 Subject: [PATCH] More comments. --- solver/types.go | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/solver/types.go b/solver/types.go index 00641de..2630306 100644 --- a/solver/types.go +++ b/solver/types.go @@ -9,16 +9,28 @@ import ( // Solve a given Sudoku puzzle by iterating through all possible solutions. type Solver struct { 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 + // 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 }