-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
43 lines (43 loc) · 1.28 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Package sudoku contains the solver for the well known and ubiquitous Sudoku game.
// The sudoku package is just a library that can be used by anyone. Based on this fact, there is not an executable
// part of this repository.
//
// When the Sudoku Board is created there are many ways how to fill clues
// (the original values before the user input any other guesses). A clue can be set by a single value, row, column or
// entirely whole board at once.
//
// Sudoku can be solved by calling the method `Solve` on created Sudoku instance. Moreover, the whole sudoku can be
// printed in any state, because implements the `Stringer` interface
//
// Example of basic usage:
//
// package main
//
// import (
// "fmt"
// "github.com/lukasaron/sudoku"
// "log"
// )
//
// func main() {
// game := sudoku.NewBoard().SetBoard([][]int{
// {0, 0, 0, 0, 0, 0, 1, 4, 8},
// {0, 1, 0, 0, 2, 6, 0, 0, 3},
// {0, 0, 0, 0, 1, 0, 6, 0, 0},
// {0, 0, 0, 0, 0, 0, 9, 0, 2},
// {1, 0, 0, 3, 6, 2, 0, 0, 7},
// {5, 0, 7, 0, 0, 0, 0, 0, 0},
// {0, 0, 5, 0, 3, 0, 0, 0, 0},
// {3, 0, 0, 1, 9, 0, 0, 7, 0},
// {4, 7, 0, 0, 0, 0, 0, 0, 0},
// })
//
// err := game.Error()
// if err != nil {
// log.Fatal(err)
// }
//
// game.Solve()
// fmt.Println(game)
// }
package sudoku