Sudoku-plugin

From VDR Wiki

(Difference between revisions)
Jump to: navigation, search
(Related Sites)
m (Reverted edits by 79.178.11.105 (Talk) to last version by TomG)
 
(3 intermediate revisions not shown)
Line 8: Line 8:
The Sudoku puzzles are generated on-the-fly. The number of givens can be set in the plug-in's setup page down to a minimum of 26 givens. The generation of puzzles with less than 26 givens takes too long. By default the cells with givens are symmetrically ordered. But this can be changed in the setup.
The Sudoku puzzles are generated on-the-fly. The number of givens can be set in the plug-in's setup page down to a minimum of 26 givens. The generation of puzzles with less than 26 givens takes too long. By default the cells with givens are symmetrically ordered. But this can be changed in the setup.
-
To solve difficult Sudoku puzzles some hints can be used. Incorrect cells are red and cells with ambiguous numbers are magenta. These hints can be disabled in the setup. With the green key a cell can be marked. A marked cell has green background color. With the yellow key the cursor is moved to the next free cell with minimal possible numbers. The red key set the next possible number for the current cell.
+
To solve difficult Sudoku puzzles some hints can be used. Incorrect cells are red and cells with ambiguous numbers are magenta. These hints can be disabled in the setup. For further hints see the commands menu, which is opened with the blue key.
-
Each time the plug-in is started from the main menu the same puzzle is shown. A new puzzle is only generated on VDR startup or if it has been requested by selecting this command in the commands menu, which is opened with the blue key.
+
Each time the plug-in is started from the main menu the same puzzle is shown. A new puzzle is only generated on VDR startup or if it has been requested by selecting this command in the commands menu.
In the commands menu you can load and save puzzles from/to the sudoku-list file. This file is located at the plugins folder inside the configuration folder of VDR. If you don't specify a configuration folder, your videodir is used (e.g. /video0/plugins/sudoku/sudoku-list).
In the commands menu you can load and save puzzles from/to the sudoku-list file. This file is located at the plugins folder inside the configuration folder of VDR. If you don't specify a configuration folder, your videodir is used (e.g. /video0/plugins/sudoku/sudoku-list).
Line 18: Line 18:
A sudoku dump consists of up to three parts. The first part contains only the givens, the second part all numbers set so far (including the givens), and the third part the marked cells. They are delimited from each other by a colon. All except of the first part is optional. The parts are strings with 81 digits or underlines. An underline is considered as a zero. All other characters, except of colons and spaces, which terminate the string, are ignored. They could be used to structure the dump, e.g. plus signs after each 9 digits/underlines.
A sudoku dump consists of up to three parts. The first part contains only the givens, the second part all numbers set so far (including the givens), and the third part the marked cells. They are delimited from each other by a colon. All except of the first part is optional. The parts are strings with 81 digits or underlines. An underline is considered as a zero. All other characters, except of colons and spaces, which terminate the string, are ignored. They could be used to structure the dump, e.g. plus signs after each 9 digits/underlines.
-
==Hardware requirements==
+
===Handling===
-
 
+
{| class="wikitable"
-
==Software requirements==
+
-
VDR >= 1.3.47
+
-
 
+
-
==Installation==
+
-
See [[plugin installation]]
+
-
 
+
-
 
+
-
== Related Sites ==
+
-
 
+
-
[http://sudokuhints.org sudoku hints] hints and tricks
+
-
 
+
-
[http://sudokutips.us sudoku tips] sudoku tips
+
-
 
+
-
[http://sudokusolver.info sudoku solver] sudoku online super solver
+
-
 
+
-
[http://solvesudoku.net solve sudoku] solve sudoku
+
-
 
+
-
[http://dailysudoku.info online daily sudoku] daily free sudoku puzzles
+
-
 
+
-
[http://suduko.sudukos.com suduko] online suduko puzzles
+
-
 
+
-
[http://sudokutricks.info sudoku tricks] sudoku tricks website
+
-
 
+
-
[http://dailysudoku.info daily sudoku] daily free sudoku puzzles
+
-
 
+
-
==Setup==
+
-
{| border=1 cellpadding=2 cellspacing=0 width=100%
+
-
|- bgcolor=#efdead
+
-
!Parameter
+
-
!Values
+
-
!Default
+
-
!Description
+
-
|-
+
-
|bgcolor=#efefef| Givens count || 26-81 || 36 || Givens count of the generated puzzles.
+
-
|-
+
-
|bgcolor=#efefef| Symmetric givens || yes/no || yes || Cells with givens are symmetrically ordered.
+
-
|-
+
-
|bgcolor=#efefef| Mark errors || yes/no || yes || Incorrect cells are marked with red color.
+
-
|-
+
-
|bgcolor=#efefef| Mark ambiguous numbers || yes/no || yes || Cells with ambiguous numbers are marked with magenta color.
+
|-
|-
-
|bgcolor=#efefef| Show possible numbers as pattern || yes/no || yes || Show a pattern in all empty cells representing the possible numbers. The pattern is structured by a small 3 x 3 grid featuring the numbers from 1 to 9 from top left to bottom right. If a number is possible in this cell the background of the corresponding grid section is colored.
 
-
|-
 
-
|bgcolor=#efefef| Show possible numbers as digits (VDR >= 1.5.4) || yes/no || yes || Show digits in all empty cells representing the possible numbers.
 
-
|-
 
-
|bgcolor=#efefef| Clear marks on reset || yes/no || no || Unmark all cells when the puzzle is reset.
 
-
|-
 
-
|bgcolor=#efefef| Transparency (%) || 0-100 || 50 || Set the transparency of the menu.
 
-
|}
 
-
 
-
==Usage==
 
-
{| border=1 cellpadding=2 cellspacing=0 width=100%
 
-
|- bgcolor=#efdead
 
!Key
!Key
!Description
!Description
Line 82: Line 30:
|bgcolor=#efefef| 0 || Remove the number from the current cell.
|bgcolor=#efefef| 0 || Remove the number from the current cell.
|-
|-
-
|bgcolor=#efefef| Green || Mark/unmark the current cell.
+
|bgcolor=#FF0000| Red || Execute red key command.
|-
|-
-
|bgcolor=#efefef| Yellow || Move the cursor to the next free cell with minimal possible numbers.
+
|bgcolor=#00FF00| Green || Execute green key command.
|-
|-
-
|bgcolor=#efefef| Red || Set the next possible number for the current cell - reset the number if greater numbers are not possible.
+
|bgcolor=#FFFF00| Yellow || Execute yellow key command.
|-
|-
-
|bgcolor=#efefef| Blue || Open the commands menu.
+
|bgcolor=#0000FF| Blue || Open the commands menu.
|-
|-
|bgcolor=#efefef| Back || Quit the plug-in.
|bgcolor=#efefef| Back || Quit the plug-in.
|}
|}
-
==Commands menu==
+
===Commands menu===
-
{| border=1 cellpadding=2 cellspacing=0 width=100%
+
{| width=100% class="wikitable"
-
|- bgcolor=#efdead
+
|-
!Command
!Command
!Description
!Description
Line 104: Line 52:
|-
|-
|bgcolor=#efefef| Save the puzzle || Add the puzzle to the sudoku list, together with an optional description.
|bgcolor=#efefef| Save the puzzle || Add the puzzle to the sudoku list, together with an optional description.
 +
|-
 +
|bgcolor=#efefef| Undo last action || Go one step backward in the history.
 +
|-
 +
|bgcolor=#efefef| Redo last action || Go one step forward in the history.
 +
|-
 +
|bgcolor=#efefef| Mark/unmark || Mark/unmark the current cell.
 +
|-
 +
|bgcolor=#efefef| Next cell || Move the cursor to the next free cell with minimal possible numbers.
 +
|-
 +
|bgcolor=#efefef| Next number || Set the next possible number for the current cell - reset the number if greater numbers are not possible.
|-
|-
|bgcolor=#efefef| Reset the puzzle || Reset the numbers in all cells, excluding the givens.
|bgcolor=#efefef| Reset the puzzle || Reset the numbers in all cells, excluding the givens.
Line 112: Line 70:
|}
|}
-
==Cell colors==
+
===Cell colors===
-
{| border=1 cellpadding=2 cellspacing=0
+
{| class="wikitable"
|-
|-
|bgcolor=#00FFFF| Cyan || Givens
|bgcolor=#00FFFF| Cyan || Givens
Line 122: Line 80:
|-
|-
|bgcolor=#FF00FF| Magenta || Ambiguous numbers
|bgcolor=#FF00FF| Magenta || Ambiguous numbers
 +
|}
 +
 +
==Hardware requirements==
 +
 +
==Software requirements==
 +
VDR >= 1.6.0
 +
 +
==Installation==
 +
See [[plugin installation]]
 +
 +
==Configuration==
 +
 +
===Setup===
 +
{| class="wikitable"
 +
|-
 +
!Parameter
 +
!Values
 +
!Default
 +
!Description
 +
|-
 +
|bgcolor=#efefef| Givens count || 26-81 || 36 || Givens count of the generated puzzles.
 +
|-
 +
|bgcolor=#efefef| Symmetric givens || yes/no || yes || Cells with givens are symmetrically ordered.
 +
|-
 +
|bgcolor=#efefef| Mark errors || yes/no || yes || Incorrect cells are marked with red color.
 +
|-
 +
|bgcolor=#efefef| Mark ambiguous numbers || yes/no || yes || Cells with ambiguous numbers are marked with magenta color.
 +
|-
 +
|bgcolor=#efefef| Show possible numbers as pattern || yes/no || no || Show a pattern in all empty cells representing the possible numbers. The pattern is structured by a small 3 x 3 grid featuring the numbers from 1 to 9 from top left to bottom right. If a number is possible in this cell the background of the corresponding grid section is colored.
 +
|-
 +
|bgcolor=#efefef| Show possible numbers as digits || yes/no || no || Show digits in all empty cells representing the possible numbers.
 +
|-
 +
|bgcolor=#efefef| Clear marks on reset || yes/no || no || Unmark all cells when the puzzle is reset.
 +
|-
 +
|bgcolor=#efefef| Key Red || see commands menu || Mark/unmark || Choose command for the red key.
 +
|-
 +
|bgcolor=#efefef| Key Green || see commands menu || Undo last action || Choose command for the green key.
 +
|-
 +
|bgcolor=#efefef| Key Yellow || see commands menu || Redo last action || Choose command for the yellow key.
 +
|-
 +
|bgcolor=#efefef| Large font || all installed fonts || Sans Serif:Bold || Choose font for the large digits.
 +
|-
 +
|bgcolor=#efefef| Large font height (pixel) || 10-64 || 31 || Font height for the large digits.
 +
|-
 +
|bgcolor=#efefef| Large font width (pixel) || 10-64 || 42 || Font width for the large digits.
 +
|-
 +
|bgcolor=#efefef| Small font || all installed fonts || Sans Serif:Bold || Choose font for the small digits.
 +
|-
 +
|bgcolor=#efefef| Small font height (pixel) || 10-64 || 10 || Font height for the small digits.
 +
|-
 +
|bgcolor=#efefef| Small font width (pixel) || 10-64 || 14 || Font width for the small digits.
 +
|-
 +
|bgcolor=#efefef| Transparency (%) || 0-100 || 50 || Set the transparency of the menu.
|}
|}
==Problems==
==Problems==
 +
 +
==Current version==
 +
*[http://projects.vdr-developer.org/attachments/download/280/vdr-sudoku-0.3.5.tgz Version 0.3.5]
==Links==
==Links==
{|
{|
| [1]
| [1]
-
| http://toms-cafe.de/vdr/sudoku
+
| http://toms-cafe.de/vdr/sudoku/
-
| Plugin homepage
+
| Plug-in homepage
|-
|-
| [2]
| [2]
-
| http://www.freedailysudoku.net
+
| http://projects.vdr-developer.org/projects/show/plg-sudoku
-
| Free Daily Sudoku puzzles
+
| Development site
|}
|}

Latest revision as of 16:29, 17 August 2010

Contents

Description

Sudoku plugin screenshot

Sudoku is a VDR plug-in to generate and solve Number Place puzzles, so called Sudokus.

A Sudoku puzzle consists of 9 x 9 cells subdivided into 9 regions with 3 x 3 cells. The rules are simple. There have to be the numbers from 1 to 9 in every row, column and region. In the beginning some numbers are given. These cells are painted with cyan background color. The aim of the puzzle is to find the missing numbers. There is only one solution of a Sudoku puzzle.

The Sudoku puzzles are generated on-the-fly. The number of givens can be set in the plug-in's setup page down to a minimum of 26 givens. The generation of puzzles with less than 26 givens takes too long. By default the cells with givens are symmetrically ordered. But this can be changed in the setup.

To solve difficult Sudoku puzzles some hints can be used. Incorrect cells are red and cells with ambiguous numbers are magenta. These hints can be disabled in the setup. For further hints see the commands menu, which is opened with the blue key.

Each time the plug-in is started from the main menu the same puzzle is shown. A new puzzle is only generated on VDR startup or if it has been requested by selecting this command in the commands menu.

In the commands menu you can load and save puzzles from/to the sudoku-list file. This file is located at the plugins folder inside the configuration folder of VDR. If you don't specify a configuration folder, your videodir is used (e.g. /video0/plugins/sudoku/sudoku-list).

The sudoku-list file contains lines with a sudoku dump and an optional description. The sudoku dump has to begin at the first position of the line. The delimiter between sudoku dump and description is a space. All behind the first space is considered as description.

A sudoku dump consists of up to three parts. The first part contains only the givens, the second part all numbers set so far (including the givens), and the third part the marked cells. They are delimited from each other by a colon. All except of the first part is optional. The parts are strings with 81 digits or underlines. An underline is considered as a zero. All other characters, except of colons and spaces, which terminate the string, are ignored. They could be used to structure the dump, e.g. plus signs after each 9 digits/underlines.

Handling

Key Description
Left/Right/Up/Down Move the cursor in the puzzle.
1-9 Set the number in the current cell.
0 Remove the number from the current cell.
Red Execute red key command.
Green Execute green key command.
Yellow Execute yellow key command.
Blue Open the commands menu.
Back Quit the plug-in.

Commands menu

Command Description
Generate a new puzzle Generate a random puzzle.
Load a puzzle Load a puzzle from the sudoku list. In the list menu you can also delete sudokus from the list or edit the descriptions.
Save the puzzle Add the puzzle to the sudoku list, together with an optional description.
Undo last action Go one step backward in the history.
Redo last action Go one step forward in the history.
Mark/unmark Mark/unmark the current cell.
Next cell Move the cursor to the next free cell with minimal possible numbers.
Next number Set the next possible number for the current cell - reset the number if greater numbers are not possible.
Reset the puzzle Reset the numbers in all cells, excluding the givens.
Open setup menu Open the setup menu of the plug-in.
Exit Quit the plug-in.

Cell colors

Cyan Givens
Green Marked cells
Red Incorrect cells
Magenta Ambiguous numbers

Hardware requirements

Software requirements

VDR >= 1.6.0

Installation

See plugin installation

Configuration

Setup

Parameter Values Default Description
Givens count 26-81 36 Givens count of the generated puzzles.
Symmetric givens yes/no yes Cells with givens are symmetrically ordered.
Mark errors yes/no yes Incorrect cells are marked with red color.
Mark ambiguous numbers yes/no yes Cells with ambiguous numbers are marked with magenta color.
Show possible numbers as pattern yes/no no Show a pattern in all empty cells representing the possible numbers. The pattern is structured by a small 3 x 3 grid featuring the numbers from 1 to 9 from top left to bottom right. If a number is possible in this cell the background of the corresponding grid section is colored.
Show possible numbers as digits yes/no no Show digits in all empty cells representing the possible numbers.
Clear marks on reset yes/no no Unmark all cells when the puzzle is reset.
Key Red see commands menu Mark/unmark Choose command for the red key.
Key Green see commands menu Undo last action Choose command for the green key.
Key Yellow see commands menu Redo last action Choose command for the yellow key.
Large font all installed fonts Sans Serif:Bold Choose font for the large digits.
Large font height (pixel) 10-64 31 Font height for the large digits.
Large font width (pixel) 10-64 42 Font width for the large digits.
Small font all installed fonts Sans Serif:Bold Choose font for the small digits.
Small font height (pixel) 10-64 10 Font height for the small digits.
Small font width (pixel) 10-64 14 Font width for the small digits.
Transparency (%) 0-100 50 Set the transparency of the menu.

Problems

Current version

Links

[1] http://toms-cafe.de/vdr/sudoku/ Plug-in homepage
[2] http://projects.vdr-developer.org/projects/show/plg-sudoku Development site
Personal tools
Participate