{"id":15029218,"url":"https://github.com/coenmooij/sudoku","last_synced_at":"2025-04-05T02:42:16.684Z","repository":{"id":56956359,"uuid":"108538674","full_name":"coenmooij/sudoku","owner":"coenmooij","description":"Library for generating, validating, solving sudoku puzzles","archived":false,"fork":false,"pushed_at":"2018-10-08T11:29:12.000Z","size":77,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T11:09:47.349Z","etag":null,"topics":["library","php7","sudoku"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/coenmooij.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}},"created_at":"2017-10-27T11:37:23.000Z","updated_at":"2024-11-18T14:37:39.000Z","dependencies_parsed_at":"2022-08-21T08:50:30.156Z","dependency_job_id":null,"html_url":"https://github.com/coenmooij/sudoku","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coenmooij%2Fsudoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coenmooij%2Fsudoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coenmooij%2Fsudoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coenmooij%2Fsudoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coenmooij","download_url":"https://codeload.github.com/coenmooij/sudoku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280177,"owners_count":20912965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["library","php7","sudoku"],"created_at":"2024-09-24T20:09:58.978Z","updated_at":"2025-04-05T02:42:16.667Z","avatar_url":"https://github.com/coenmooij.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/coenmooij/sudoku/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/coenmooij/sudoku/?branch=master) [![Code Intelligence Status](https://scrutinizer-ci.com/g/coenmooij/sudoku/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) [![Build Status](https://travis-ci.org/coenmooij/sudoku.svg?branch=master)](https://travis-ci.org/coenmooij/sudoku)\n\n# sudoku\nLibrary for generating, validating, solving sudoku puzzles\n\n## Composer\nTo use this package, simply run `composer require coenmooij/sudoku`.\n\n## Usage\n\n### SudokuService\nExposes the main functionality of the library in a service.\n\n### Solvers\n\n#### BacktrackSolver\nSolves any solvable grid using an informed backtrack algorithm. Throws an `UnsolvableException` if it fails.\n\n#### SimpleSolver\nSolves the grid using only row, column and block checks. Will return the (partially) completed `Grid`.\n\n### Generators\n\n#### SolutionGenerator\nGenerates a complete `Grid`\n\n#### PuzzleGenerator\nCreates a puzzle based on a complete `Grid` and a `Difficulty`\nDifficulty ranges from 1-5 and can be accessed by a constant. e.g. `Difficulty::EASY`.\n\n#### HintGenerator\nFrom a grid it creates hints. It returns locations which can be solved by row, column \u0026 block checks.\nYou can either get a random one or all of them.\n\n### GridSerializer\n`GridSerializer` is a simple serializer that turns a 81 character string into a `Grid` and back.\ne.g. `642957138719843652538126794483712569976538421125694387294361875357489216861275943`\nEmpty values will be serialized to `0` but the deserializer also accepts alphabetical characters as empty values. \n\n### Validator\n\n#### DigValidator\nHelper class to see if it is 'safe' to dig out the value at a certain `Location`. It checks whether the `Grid` is still uniquely solvable.\n\n#### GridValidator\nSimple utility class to check if all (row, column and block) constraints are still met.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoenmooij%2Fsudoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoenmooij%2Fsudoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoenmooij%2Fsudoku/lists"}