{"id":20266872,"url":"https://github.com/pinedah/sudoku_in_c","last_synced_at":"2026-08-16T19:31:07.866Z","repository":{"id":248788739,"uuid":"829759412","full_name":"Pinedah/sudoku_in_C","owner":"Pinedah","description":"A Sudoku game built in C playable with the keyboard! ","archived":false,"fork":false,"pushed_at":"2024-08-30T02:16:14.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T08:38:17.016Z","etag":null,"topics":["basic-programming","c","console-game","game","keyboard-game","keyboard-navigation","sudoku","sudoku-game"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pinedah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-17T01:42:55.000Z","updated_at":"2025-08-26T12:38:08.000Z","dependencies_parsed_at":"2024-07-22T19:11:40.728Z","dependency_job_id":"7cf25e65-4558-4369-8ccc-3d3ff3a4f521","html_url":"https://github.com/Pinedah/sudoku_in_C","commit_stats":null,"previous_names":["pinedah/sudoku_in_c"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pinedah/sudoku_in_C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinedah%2Fsudoku_in_C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinedah%2Fsudoku_in_C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinedah%2Fsudoku_in_C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinedah%2Fsudoku_in_C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pinedah","download_url":"https://codeload.github.com/Pinedah/sudoku_in_C/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinedah%2Fsudoku_in_C/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36722846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-06T04:43:03.162Z","status":"online","status_checked_at":"2026-08-16T02:00:06.462Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["basic-programming","c","console-game","game","keyboard-game","keyboard-navigation","sudoku","sudoku-game"],"created_at":"2024-11-14T12:11:55.352Z","updated_at":"2026-08-16T19:31:07.832Z","avatar_url":"https://github.com/Pinedah.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sudoku Game in C (Playable with the keyboard!)\n\nWelcome to the Sudoku Game repository! This project is a simple yet challenging Sudoku game built entirely in the C programming language. The game offers three difficulty levels, allowing players to choose their preferred level of challenge.\n\n\n## Sudoku Rules\n\nSudoku is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9x9 grid with digits so that each column, each row, and each of the nine 3x3 subgrids (also called \"boxes\") contain all of the digits from 1 to 9. The puzzle starts with some cells already filled in, and the difficulty of the puzzle depends on the number of cells initially filled and their arrangement.\n\n### Basic Rules:\n1. Each row must contain the digits 1 to 9 without repetition.\n2. Each column must contain the digits 1 to 9 without repetition.\n3. Each of the nine 3x3 subgrids must contain the digits 1 to 9 without repetition.\n\n## How to Play\n\n1. **Choose Difficulty**: The game offers three difficulty levels—easy, medium, and hard. The difficulty level determines the number of pre-filled cells and the complexity of the puzzle.\n2. **Fill the Grid**: Using the numbers 1 to 9, fill the empty cells on the grid. Ensure that each number appears only once in each row, column, and 3x3 subgrid.\n3. **Solve the Puzzle**: Continue filling in numbers until the entire grid is complete. The game will verify if the solution is correct.\n\n## How to Compile and Run\n\nTo compile and run the Sudoku game, follow these steps:\n\n1. **Clone the Repository**:\n    ```bash\n    git clone https://github.com/pinedah/sudoku_in_c.git\n    cd sudoku-game\n    ```\n\n2. **Compile the Game**:\n    ```bash\n    gcc -o sudoku sudoku.c\n    ```\n\n3. **Run the Game**:\n    ```bash\n    ./sudoku\n    ```\n\n## References for Sudoku Generation Algorithm\n\nThe algorithm provided for generating a Sudoku grid involves several well-known concepts and techniques commonly used in Sudoku puzzle generation and solving. Here are the main concepts and some references:\n\n1. **Backtracking Algorithm**:\n   - The `fillGrid` function uses a backtracking algorithm to fill the grid with a valid Sudoku solution. Backtracking is a general algorithm for finding all (or some) solutions to computational problems, notably used in constraint satisfaction problems like Sudoku.\n   - Reference: [\"Backtracking\" on Wikipedia](https://en.wikipedia.org/wiki/Backtracking)\n\n2. **Constraint Propagation**:\n   - The `isSafe` function checks if placing a number violates any Sudoku rules. This is a form of constraint propagation, ensuring that constraints (rules) are satisfied.\n   - Reference: [\"Constraint satisfaction problem\" on Wikipedia](https://en.wikipedia.org/wiki/Constraint_satisfaction_problem)\n\n3. **Randomization**:\n   - The grid is filled with random numbers from 1 to 9, and cells are removed randomly to create the puzzle. Randomization helps in generating different puzzles each time.\n   - Reference: [\"Sudoku\" on Wikipedia, especially the \"Construction\" section](https://en.wikipedia.org/wiki/Sudoku#Construction)\n\n4. **Sudoku Puzzle Difficulty**:\n   - The number of cells removed to set the difficulty level of the puzzle is based on typical practices in Sudoku puzzle creation. More cells removed generally means a higher difficulty level.\n   - Reference: [\"Sudoku\" on Wikipedia, particularly the sections discussing puzzle generation and difficulty](https://en.wikipedia.org/wiki/Sudoku)\n\nThese references provide a comprehensive background on the techniques and concepts used in the provided algorithm for generating a Sudoku grid with varying difficulty levels.\n\n\n## Note\n\nI built this Sudoku game because I saw my girl, playing it once and told her I could build it. This project is dedicated to her and her love for Sudoku.\n\nEnjoy the game!\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinedah%2Fsudoku_in_c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinedah%2Fsudoku_in_c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinedah%2Fsudoku_in_c/lists"}