Re: Suduko solver demo



bherbst65@xxxxxxxxxxx wrote:
Hi All,
Well, well !!!
What a stunning output. I must have fell upon the
secret code.

Looking for a possible link within the program that
Patrick May gave me above, so as to get a visible
solution,  I inserted this:
............... snip........
  public void test()
    {
        int[][] testBoard = { {0,6,0,1,0,4,0,5,0},
            {0,0,8,3,0,5,6,0,0},
            {2,0,0,0,0,0,0,0,1},


{8,0,0,4,0,7,0,0,6}, {0,0,6,0,0,0,3,0,0}, {7,0,0,9,0,1,0,0,4},


{5,0,0,0,0,0,0,0,2}, {0,0,7,2,0,6,9,0,0}, {0,4,0,5,0,8,0,7,0} };


solve(testBoard);

        int c=0;
        for(int xc = 0; xc< 9; xc++){
            for(int yc = 0; yc < 9; yc++){
                System.out.println(c+". "+ board[xc][yc]);
                c++;
            }
        }
    }
............... end of snip........

and the output  at this point is:

0. Sudoku$Cell@1f243d1
1. Sudoku$Cell@767286
2. Sudoku$Cell@e9aa13
3. Sudoku$Cell@1f195fc

...............
61. Sudoku$Cell@120b2da
62. Sudoku$Cell@14426a6
63. Sudoku$Cell@5b38d7
64. Sudoku$Cell@528780
65. Sudoku$Cell@5cc942
66. Sudoku$Cell@1c01ba9
67. Sudoku$Cell@23d275
68. Sudoku$Cell@c135d6
69. Sudoku$Cell@19c4091
70. Sudoku$Cell@e7d53

...............
76. Sudoku$Cell@11e1bbf
77. Sudoku$Cell@bfd66a
78. Sudoku$Cell@175b7f9
79. Sudoku$Cell@a010ba
80. Sudoku$Cell@ae1cf


What is the meaning of this or how can I see a output that I can use?

Bob

Don't have a clue..

Looks like interrupted address displacements into
Sudoku.Cell

For that class Sudoku$Cell do you have a getter\accessors to display something.. and not the whole object. Problem definitely in solve(testBoard); What are you doing in solve()..

A debugger would help out a lot.

--


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________


'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)
.



Relevant Pages

  • Re: Suduko solver demo
    ... > What a stunning output. ... > secret code. ... occur in each cell. ... But Patrick May's code doesn't contain a single ...
    (comp.lang.java.help)
  • Re: Suduko solver demo
    ... What a stunning output. ... secret code. ... Patrick May gave me above, so as to get a visible ... Prev by Date: ...
    (comp.lang.java.help)