sudokusolver 1.2.3

Solves sudoku puzzles.


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

sudokusolver

A D library that solves sudoku puzzles.

Example

import std.stdio;
import sudokusolver;

void main() {
	Board board = new Board(9, [
			0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 2, 5, 9, 0, 4, 7, 8, 0,
			3, 7, 9, 0, 8, 0, 0, 0, 0,
			0, 0, 0, 6, 0, 0, 0, 0, 3,
			0, 0, 3, 0, 0, 1, 0, 0, 9,
			0, 0, 0, 0, 2, 5, 0, 0, 0,
			0, 0, 8, 0, 4, 0, 0, 6, 7,
			0, 1, 4, 8, 0, 0, 0, 0, 0,
			0, 3, 6, 0, 0, 2, 4, 0, 0
	]);

	Solver solver = new Solver(board); //Creates a Solver, which actually contains the logic to solve the board.

	if (solver.solve()) { //solve() solves the board and returns true if it was successfully solved, or false if it wasn't
		board.printState();
	} else { //The board was not successfully solved:
		writeln("The board could not be solved.");
	}
}
Authors:
  • Flying-Toast
Dependencies:
none
Versions:
1.2.3 2018-Oct-19
1.2.2 2018-Oct-19
1.2.1 2018-Oct-18
1.2.0 2018-Oct-18
1.1.0 2018-Oct-18
Show all 8 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 8 downloads total

Score:
0.0
Short URL:
sudokusolver.dub.pm