Module: Kudo
- Defined in:
- lib/kudo.rb,
lib/kudo/cli.rb,
lib/kudo/ping.rb,
lib/kudo/solver.rb,
lib/kudo/version.rb,
lib/kudo/converter.rb,
lib/kudo/validator.rb
Defined Under Namespace
Classes: CLI, Converter, Operator, Solver, Validator
Constant Summary collapse
- VERSION =
"0.2.1"
Class Method Summary collapse
Class Method Details
.ping ⇒ Object
6 7 8 |
# File 'lib/kudo/ping.rb', line 6 def ping "pong!" end |
.solve(sudoku_string) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/kudo.rb', line 13 def solve(sudoku_string) grid = Converter.convert_to_array(sudoku_string) raise "Sudoku is invalid!" unless Validator.check_valid(grid) Converter.convert_to_string(Solver.solve(grid)) end |