CODE |
ec1- A couple size optimizations. - Change hints to increase with difficulty, instead of decrease. (done) - Add original number marking. (done) - Moving instruction text to appear before filling in numbers. - Add credits for HarrierFalcon's inspiration for the scrambling routine. (done) c2 |
CODE |
ec1:[[1,7,8,3,4,2,6,5,9][4,9,3,5,1,6,7,8,2][5,6,2,9,7,8,4,1,3][9,5,4,7,3,1,2,6,8][8,1,7,6,2,9,5,3,4][3,2,6,8,5,4,1,9,7][7,8,5,2,6,3,9,4,1][6,3,1,4,9,7,8,2,5][2,4,9,1,8,5,3,7,6→[J] :For(A,0,1 :[J]T→[J] :For(B,0,2 :For(C,0,7 :rowSwap([J],randInt(1,3)+3B,3B+randInt(1,3→[J] :End :End :Endc2 |
CODE |
ec1:[[1,7,8,3,4,2,6,5,9][4,9,3,5,1,6,7,8,2][5,6,2,9,7,8,4,1,3][9,5,4,7,3,1,2,6,8][8,1,7,6,2,9,5,3,4][3,2,6,8,5,4,1,9,7][7,8,5,2,6,3,9,4,1][6,3,1,4,9,7,8,2,5][2,4,9,1,8,5,3,7,6 :For(A,0,1 :AnsT :For(B,0,2 :For(C,0,7 :rowSwap(Ans,randInt(1,3)+3B,3B+randInt(1,3 :End :End :End :Ans→[J]c2 |
CODE |
ec1For(A,1,26+8D Repeat (B,C randInt(1,9→B randInt(1,9→C End 0→(B,C Endc2 |
QUOTE (patz2009 @ 24 Oct, 2007, 17:54) |
I'm not entirely "generating" the sudokus per-se, but more like scrambling it. |
CODE |
ec1:For(A,1,26+8D :Repeat (B,Ans :randInt(1,9→B :randInt(1,9 :End :0→(B,Ans :Endc2 |
CODE |
ec1:"randInt(1,9→u :For(A,1,26+8D :Repeat (B,Ans :u→B:u :End :0→(B,Ans :Endc2 |
QUOTE (Liazon @ 25 Oct, 2007, 22:28) |
interestingly, mathematicians say that 17 is the smallest # of known squares for a solvable single solution sudoku. duno how they proved that, and duno if that means every 17 # sudoku is solvable. |
CODE |
ec11 2 3 | 0 0 0 | 0 0 0 4 5 6 | 0 0 0 | 0 0 0 7 8 9 | 0 0 0 | 0 0 0 ------+-------+------ 3 1 2 | 0 0 0 | 0 0 0 5 6 4 | 0 0 0 | 0 0 0 9 0 0 | 0 0 0 | 0 0 0 ------+-------+------ 0 0 0 | 0 0 0 | 0 0 0 0 0 0 | 0 0 0 | 0 0 0 0 0 0 | 0 0 0 | 0 0 0c2 |
QUOTE (Liazon @ 29 Oct, 2007, 16:37) |
wrapping what? and I agree w/ Kevin, it's not too big |