Difference between revisions of "Sudoku"

From Free Pascal wiki
 
m (Description)
Line 17: Line 17:
 
===Description===
 
===Description===
 
The programs solves all Sudoku puzzles that can be solved by logic. It will not solve the puzzle where you need to guess for a solution.
 
The programs solves all Sudoku puzzles that can be solved by logic. It will not solve the puzzle where you need to guess for a solution.
 +
 
So it follows these rules (taken from [http://www.websudoku.com/ WebSudoku]):
 
So it follows these rules (taken from [http://www.websudoku.com/ WebSudoku]):
 +
 
The rules of Sudoku are simple. Enter digits from 1 to 9 into the  blank spaces. Every row must contain one of each digit. So must every column, as must every 3x3 square.
 
The rules of Sudoku are simple. Enter digits from 1 to 9 into the  blank spaces. Every row must contain one of each digit. So must every column, as must every 3x3 square.
 
Each Sudoku has a unique solution that can be reached logically without guessing.
 
Each Sudoku has a unique solution that can be reached logically without guessing.

Revision as of 18:01, 22 February 2006

About

There is very little to tell about this program. It is just an attempt to make a program which solves Sudoku puzzles.

License

This application can be used under Lazarus modified LGPL and MPL, this allows making commercial projects that use this code but NO WARANTY, you are the only responsable if this code doesn't work or causes any problems to your computer.

Author

Matthijs Willemstein

Download

The application can be found on the Lazarus CCR Files page.

Usage

If you run the program you will see a grid, and two buttons. If you press the "Fill" button, you are able to edit the grid and place the numbers in the grid according to you puzzle. When you are finished entering the digits press "Solve" and the grid will be filled with the solution.

Description

The programs solves all Sudoku puzzles that can be solved by logic. It will not solve the puzzle where you need to guess for a solution.

So it follows these rules (taken from WebSudoku):

The rules of Sudoku are simple. Enter digits from 1 to 9 into the blank spaces. Every row must contain one of each digit. So must every column, as must every 3x3 square. Each Sudoku has a unique solution that can be reached logically without guessing.