gvp16 Posted March 23, 2010 Share Posted March 23, 2010 Hi guys, i need to make a suduko solver that completes the grid when you enter some of the numbers. but i cant quite figure out how to do it, one way i can think is to compare all the values from the input boxes in a row/ column, and if they add up to the total then it is correct, but im sure there is a better/ more dynamic way. I dont want someone to do the work for me, just a point in the write direction. Thanks. Link to comment https://forums.phpfreaks.com/topic/196285-suduko-solver/ Share on other sites More sharing options...
JAY6390 Posted March 23, 2010 Share Posted March 23, 2010 http://forum.phpvideotutorials.com/showpost.php?p=78071&postcount=8 Link to comment https://forums.phpfreaks.com/topic/196285-suduko-solver/#findComment-1030746 Share on other sites More sharing options...
gvp16 Posted March 23, 2010 Author Share Posted March 23, 2010 Thanks for that, but i just cant get my head round how i check all the rows and colums for the correct combination Link to comment https://forums.phpfreaks.com/topic/196285-suduko-solver/#findComment-1030779 Share on other sites More sharing options...
oni-kun Posted March 23, 2010 Share Posted March 23, 2010 Quote Thanks for that, but i just cant get my head round how i check all the rows and colums for the correct combination You can create a multidemensional array out of the POST elements, so you can easily compare (and thus calculate) a1, b1, c1 or a1, a2, a3 to solve it. Link to comment https://forums.phpfreaks.com/topic/196285-suduko-solver/#findComment-1030784 Share on other sites More sharing options...
Daniel0 Posted March 23, 2010 Share Posted March 23, 2010 I once wrote one in Standard ML as an extra optional assignment: http://daniel0.net/sudoku.sml And stripped off Danish comments that you probably can't read anyway + stripped sudoku generator (EDIT: well, you probably can't read the source code either, but I posted it anyway in case someone would be interested): http://daniel0.net/sudoku_no_comments.sml Link to comment https://forums.phpfreaks.com/topic/196285-suduko-solver/#findComment-1030792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.