File tree 2 files changed +13
-11
lines changed
2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -635,8 +635,9 @@ func (s *S) cleanupSolve() {
635
635
drvd := s .Driver .Derive (s .x )
636
636
if drvd .TargetLevel < s .endTestLevel {
637
637
trail .Back (s .endTestLevel )
638
- s .x = CNull
639
- //break
638
+ trail .Assign (drvd .Unit , drvd .P )
639
+ s .x = trail .Prop ()
640
+ continue
640
641
}
641
642
trail .Back (drvd .TargetLevel )
642
643
trail .Assign (drvd .Unit , drvd .P )
Original file line number Diff line number Diff line change @@ -99,14 +99,15 @@ func Example_sudoku() {
99
99
}
100
100
}
101
101
fmt .Printf ("\n " )
102
- // Output: 5 2 9 1 3 6 7 4 8
103
- // 4 3 1 7 8 5 2 9 6
104
- // 8 7 6 4 9 2 1 3 5
105
- // 1 6 3 2 4 8 5 7 9
106
- // 2 4 5 9 1 7 8 6 3
107
- // 7 9 8 5 6 3 4 1 2
108
- // 6 5 4 3 2 1 9 8 7
109
- // 3 1 2 8 7 9 6 5 4
110
- // 9 8 7 6 5 4 3 2 1
102
+
111
103
}
104
+ // Output: 5 2 9 1 3 6 7 4 8
105
+ // 4 3 1 7 8 5 2 9 6
106
+ // 8 7 6 4 9 2 1 3 5
107
+ // 1 6 3 2 4 8 5 7 9
108
+ // 2 4 5 9 1 7 8 6 3
109
+ // 7 9 8 5 6 3 4 1 2
110
+ // 6 5 4 3 2 1 9 8 7
111
+ // 3 1 2 8 7 9 6 5 4
112
+ // 9 8 7 6 5 4 3 2 1
112
113
}
You can’t perform that action at this time.
0 commit comments