Results 1 to 1 of 1

Thread: Sudoku

  1. #1

    Joined
    Oct 2012
    Posts
    197
    Userbars
    2
    Thanks
    11
    Thanked
    87/50
    DL/UL
    18/0
    Mentioned
    30 times
    Time Online
    5d 9h 44m
    Avg. Time Online
    1m

    Sudoku

    So I've been porting my PHP Sudoku script to C# and just came across an issue。。。

    It would never generate the full puzzle...

    After about an hour of running in circles, I found the answer...

    Code:
            public int[] getBox(int x, int y) {
                x = 5;
    It's always the simplest things that get me stuck for the longest periods of time.
    Must remember to remove test variables.

    The good news...

    Code:
    {1, 2, 3, 4, 5, 6, 7, 8, 9}
    {8, 7, 5, 9, 2, 3, 1, 6, 4}
    {6, 9, 4, 7, 8, 1, 5, 3, 2}
    {4, 5, 9, 1, 6, 7, 8, 2, 3}
    {3, 8, 2, 5, 9, 4, 6, 7, 1}
    {7, 6, 1, 2, 3, 8, 4, 9, 5}
    {2, 1, 7, 8, 4, 9, 3, 5, 6}
    {5, 4, 6, 3, 7, 2, 9, 1, 8}
    {9, 3, 8, 6, 1, 5, 2, 4, 7}
    Now with a 0.3% generation success rate.
    Last edited by Celestial; 01-23-2013 at 04:05 AM.
    If my post helped please send $2,000,000 via PayPal!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •