you need javascript to make it work smoothly. you can either code the whole thing in js or use php and then use javascript to interact with the PHP script through AJAX.
of course you could also code the whole thing in java or flash too, but then this is a php forum!
That's terrific, Justin. Many thanks indeed. To my shame, I'm not familiar with java. It's one of those things I plan to become more knowledgeable about. But this looks excellent, and I will busy myself with it, and hopefully get it tamed for my use.
Another great thing you have helped me with. It's appreciated very much. All the best
paul
Notes:
+ The function only generates the integers; you'll have to build your own interface.
+ make this the last statement of the function:
return array($puzzle, $solution);
so the call becomes:
list($puzzle, $solution) = generate(3);
+ $puzzle and $solution are strings of comma separated integers. Difficulty level 3 returns 81 integers in $solution, while in the puzzle an amount of these are left out.
$apuzzle = explode(',', $puzzle); makes it an array.
Every 9 elements start a new row in the 9 x 9 sudoku grid.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.