diff --git a/solver/printers.go b/solver/printers.go index b688348..0235b5c 100644 --- a/solver/printers.go +++ b/solver/printers.go @@ -6,8 +6,8 @@ import ( ) func (solver *Solver) print_solutions() { - for solutions := range solver.solutions { - log.Printf("\nSolution #%d:", solutions+1) - fmt.Println(solver.solutions[solutions]) + for solution_index, solution := range solver.solutions { + log.Printf("\nSolution #%d:", solution_index+1) + fmt.Println(solution) } } diff --git a/solver/processing.go b/solver/processing.go index 85e08a9..136676e 100644 --- a/solver/processing.go +++ b/solver/processing.go @@ -41,9 +41,9 @@ func (solver *Solver) find_blocks(row *string, rows *[]int) { selection = nil } - for block := range curr_blocks { + for _, block := range curr_blocks { - curr_row := strconv.Itoa(curr_blocks[block]) + curr_row := strconv.Itoa(block) if func_row[letter] == curr_row[letter] { found_row, _ := strconv.Atoi(curr_row)