项目作者: wadiim

项目描述 :
A (killer) sudoku solver.
高级语言: Ruby
项目地址: git://github.com/wadiim/kira.git
创建时间: 2021-02-10T20:39:05Z
项目社区:https://github.com/wadiim/kira

开源协议:MIT License

下载


Kira

A (killer) sudoku solver.

Requirements

Installation

  1. gem install kira

Usage

  1. kira [options]

Options

Option Meaning
-h, --help Show help message and exit.
-V, --version Output version information and exit.
--pretty[=<format>] Pretty-print the result in a given format, where <format> can be ascii or box. When ascii argument is given, then `\ ,-, and+ASCII characters will be used to create the grid. Theboxargument tellskirato use Unicode box-drawing characters for grid generation. When=is omitted, it defaults toascii`.
--color Colorize the output.

Input syntax

The kira‘s input consists of an optional grid of cell values and any number
(including zero) of equations. The grid consists of values from 1 to 9 and dots
representing empty cells. If present, the grid should have a length of 81.
An equation consists of one or more 2-dimensional coordinates of cells,
separated by the + sign, followed by the = sign and an integer. Each
coordinate consists of zero-based row and column numbers separated by a comma
and surrounded with parentheses. Whitespace characters are generally ignored,
but each equation needs to be on its own line.

To finish entering the input, type Ctrl-D on GNU/Linux or
Ctrl-Z followed by Enter on Windows.

Example

  1. $ kira
  2. 64.......
  3. 7........
  4. ....7941.
  5. .........
  6. .........
  7. 21.......
  8. 4........
  9. .........
  10. ......834
  11. (2,0)+(3,0)+(3,1)=17
  12. (1,1)+(2,1)=8
  13. (0,2)+(0,3)+(1,2)+(1,3)+(1,4)=25
  14. (2,2)+(2,3)=8
  15. (0,4)+(0,5)+(1,5)=8
  16. (0,6)+(0,7)+(0,8)=12
  17. (1,6)+(1,7)=17
  18. (1,8)+(2,8)=11
  19. (4,0)+(4,1)=14
  20. (3,2)+(4,2)+(5,2)=19
  21. (3,3)+(3,4)+(3,5)+(3,6)=15
  22. (4,3)+(4,4)=9
  23. (5,3)+(5,4)+(5,5)+(5,6)=22
  24. (4,5)+(4,6)=10
  25. (3,7)+(3,8)+(4,7)+(4,8)+(5,7)+(5,8)=34
  26. (7,0)+(8,0)+(8,1)=17
  27. (6,1)+(7,1)=10
  28. (6,2)+(6,3)=12
  29. (7,2)+(7,3)+(7,4)+(8,2)+(8,3)=27
  30. (6,4)+(6,5)+(6,6)+(6,7)=26
  31. (7,5)+(8,4)+(8,5)=9
  32. (7,6)+(7,7)=7
  33. (6,8)+(7,8)=8
  34. 6 4 9 8 1 5 2 7 3
  35. 7 5 1 3 4 2 9 8 6
  36. 8 3 2 6 7 9 4 1 5
  37. 3 6 8 2 5 7 1 4 9
  38. 5 9 4 1 8 3 7 6 2
  39. 2 1 7 9 6 4 3 5 8
  40. 4 2 5 7 3 8 6 9 1
  41. 1 8 3 4 9 6 5 2 7
  42. 9 7 6 5 2 1 8 3 4

License

MIT