Sudsoln

Latest version: v0.1.0

Safety actively analyzes 682334 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

0.1.1

* Write more solving features:
+ working on `.solve_by_pointing_pairs()` to handle `by` argument properly; currently, it only works with `by = 'submatrix'`


ver 0.1.0 (current version)

* Added `fprint()` function; it prints out a formatted string version of `Sudoku`.
* Changed the name: `.solve_by_pairs()` -> `.solve_by()` because it can now handle cases involving more than pairs (e.g. triples).
* Changed the displaying message in `.solve_forcefully()`
* Declared `Development Status :: 3 - Alpha`
* Deleted unittests on `Sudoku.solve_forcefully()` since its case is now covered under `test_solve()` in `tests.py`
* Wrote unittests on `Appearance.sieve()`, `Candidate.refine()`, and `Sudoku.solve()` in `tests.py`

0.0.21

* Adjusted the code in `.solve()` to NOT give `start` argument to `.solve_forcefully()` since it is deprecated
* Deleted the commented code in `.solve()`

0.0.20

* Deprecated `start` argument of `.solve_forcefully()`; `.solve_logically()` already provides the highest quality of starting `Candidate` that this package can provide

0.0.19

* Changed the return value of `.solve*()` methods:
+ `.solve()` now returns `str` and `int`, where `int` is the number of trials in `.solve_forcefully()`; if the returning `int` is `0`, then it means the sudoku puzzle is solved via logical approaches, and logical approaches only.
+ `.solve_forcefully()` now returns `int`, the number of trials
+ `.solve_logically()` now returns either `Candidate` or `None`; if `.solve_by_*_pairs()` methods are not used (i.e. easy puzzles), then it returns `None`
* Revived `.solve_by_pairs()` to handle duplicate codes in `.solve_by_*_pairs()` methods; the default behaviour of `.solve_by_pairs()` is `.solve_by_pointing_pairs()`

0.0.18

* `Candidate.refine()` now accepts either `condition = ['contains', 1]` or `condition = ['contains', 2]` only; `['both', 2]` has been completely deprecated from `Candidate.refine()` (but NOT from `Appearance.sieve()`) since `['contains', 2]` is a more versatile condition that also works with `by = row` and `by = col` in `.solve_by_hidden_pairs()`.
* Changed the name of method: `.solve_by_pairs()` -> `.solve_by_pointing_pairs()`
* Checked that `start` argument is working properly on both `.solve_by_hidden_pairs()` and `.solve_by_pointing_pairs()`.
* The behaviour of `Appearance.sieve()` when `deep = True` has changed; if `deep = True`, then the method will check all the second elements of the value lists of `Appearance` so that:
1. they are all the same AND
2. all has length `condition[1]`.
If not, then the respective keys that passed `condition` are furthur removed from `Appearance`. Docstring has been added to explain this behaviour.

0.0.17

* `.solve_by_hidden_pairs()` yields an 'answer' that cannot be transformed into the answer form; needs revision.
+ `Candidate.refine()` body modified so that it works only if `len(replacing_candids) == 2 and len(ent_to_replace) == 2`
* Packaging again to see if `.solve_by_hidden_pairs()` now works properly.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.