Little cleanup
This commit is contained in:
parent
38207ceda3
commit
e3be1094ea
@ -71,7 +71,7 @@ func (solver *Solver) CheckCombinations() {
|
||||
for rows7Index := range solver.row7s {
|
||||
for rows8Index := range solver.row8s {
|
||||
for rows9Index := range solver.row9s {
|
||||
go solver.routineValidator(rows1Index, rows2Index, rows3Index, rows4Index, rows5Index, rows6Index, rows7Index, rows8Index, rows9Index)
|
||||
go solver.validator(rows1Index, rows2Index, rows3Index, rows4Index, rows5Index, rows6Index, rows7Index, rows8Index, rows9Index)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -83,9 +83,8 @@ func (solver *Solver) CheckCombinations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (solver *Solver) routineValidator(rows1Index int, rows2Index int, rows3Index int, rows4Index int, rows5Index int, rows6Index int, rows7Index int, rows8Index int, rows9Index int) {
|
||||
func (solver *Solver) validator(rows1Index int, rows2Index int, rows3Index int, rows4Index int, rows5Index int, rows6Index int, rows7Index int, rows8Index int, rows9Index int) {
|
||||
|
||||
// solver.counter = solver.counter + 1
|
||||
solver.counter.Add(1)
|
||||
|
||||
if solver.validateCombination(solver.row1s[rows1Index], solver.row2s[rows2Index], solver.row3s[rows3Index], solver.row4s[rows4Index], solver.row5s[rows5Index], solver.row6s[rows6Index], solver.row7s[rows7Index], solver.row8s[rows8Index], solver.row9s[rows9Index]) {
|
||||
@ -96,6 +95,7 @@ func (solver *Solver) routineValidator(rows1Index int, rows2Index int, rows3Inde
|
||||
|
||||
func (solver *Solver) Tracker() {
|
||||
|
||||
// Add time tracking
|
||||
defer solver.timeTrack(time.Now(), "Validated solutions")
|
||||
log.Println("Validating solutions")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user