Skip to content

Solvers for KenKen and Sudoku puzzles in Clojure

License

Notifications You must be signed in to change notification settings

raxod502/puzzles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puzzles

Build Status

Summary

This library contains parsers and solvers for KenKen (puzzles.kenken) and Sudoku (puzzles.sudoku) puzzles.

Example usage

puzzles.core> (println sample-kenken/sample-4x4)

  +-------+---+---+
  | 2   - | 2 | 12|
  +-------+---+   |
  | 24  * |     * |
  +---+   +-------+
  | 2 |   | 3   - |
  |   +---+---+---+
  | / | 7   + | 2 |
  +---+-------+---+

nil
puzzles.core> (println (kenken/solve sample-kenken/sample-4x4))
3124
4213
2341
1432
nil
puzzles.core> (println sample-sudoku/sample-1)

  2.. .9. 43.
  4.3 ..7 ...
  ..7 .4. .1.

  ... .63 .8.
  1.. ... ..4
  .7. 85. ...

  .8. .3. 9..
  ... 7.. 1.6
  .64 .2. ..3

nil
puzzles.core> (println (sudoku/solve sample-sudoku/sample-1))
216 598 437
493 617 258
857 342 619

945 163 782
138 279 564
672 854 391

781 436 925
329 785 146
564 921 873
nil

About

Solvers for KenKen and Sudoku puzzles in Clojure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published