aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* c: global PUZZLE is not a booleanHEADcanonBryan Brattlof2020-08-091-1/+1
| | | | | | | | Once all the squares in the sudoku puzzle 'solve' will exit the 'while' loop with a solved puzzle. This means the global PUZZLE has been solved and we should return true here, not PUZZLE. This solved the unknown in 789c5ff
* c: move int->char cast outside 'for' loopsBryan Brattlof2020-08-091-3/+9
| | | | | | Instead of casting the 'n' integer into a "int" equivalent every time we iterate over a new peer index, store the new "int" into 'inum' and use that.
* c: rough working solver!Bryan Brattlof2020-08-081-2/+4
| | | | | I don't understand why I need to return PUZZLE from the bool solve(). however doing so will output the solved puzzle.
* c: don't clobber the index we're checkingBryan Brattlof2020-08-081-3/+3
| | | | | The inRow() inCol() and inBox() would clobber the 'i' index they where checking and returning a false true
* c: fix bug in inRowBryan Brattlof2020-08-081-2/+2
| | | | | | | 'row' was calulating the row ther given index 'i' however we didn't convert that into what the starting index should be for that row eg: row = 3 -> start index 'j' = 18
* c: switch to a global PUZZLEBryan Brattlof2020-08-081-21/+26
| | | | | | In order to stop passing a puzzle pointer around to the different functions. I decided to create a global PUZZLE object every function can access.
* c: add functions to search for possabilitiesBryan Brattlof2020-08-071-2/+48
| | | | | | | | | | the inBox, inCol, inRow functions search the 3x3 box, column, and row of the index square given (i), for the possible number (n) given. If the number is found in the box, column, or row, the number (n) is skipped and another is tried until a possibility is found. If all possibilities are exausted the 'solve()' function will backtrack. The backtracking isn't emplemented yet.
* c: rename main.c to sudoku.cBryan Brattlof2020-08-073-36/+52
| | | | | to keep with the current sudokeu.<ext> with the sudoku solvers in other languages, I've changed the c lang to sudoku.c
* c: add function to display puzzles in a 9x9 gridBryan Brattlof2020-08-061-0/+26
|
* c: add initial c codeBryan Brattlof2020-08-062-0/+13
|
* remove unused gitlab config fileBryan Brattlof2020-08-061-5/+0
|
* remove non-existant 'terminal' lexar from readmeBryan Brattlof2020-04-101-4/+4
| | | | | * pygments doesn't have a 'terminal' lexar, and cgit was print large WARNING messages on the about me page.
* add gitlab-ci for scienceBryan Brattlof2019-09-101-0/+5
| | | | | each time we update we will get the time it takes to process 10 random puzzles from our samples in sudoku.sdm
* batman! ... initial commitBryan Brattlof2019-09-103-0/+49372