NextPVR Forums

Full Version: SuDoku plugin v1.3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I've added a few enhancements to the original version but it's still pretty basic.
  • Simple timer - this will be more or less accurate depending on the speed of your system. I'll look at putting a 'true' timer in.
  • Four different levels in two styles. The levels followed by (S) provide a 'rotational symmetry' to the start grid. Before starting a game, use the down arrow to select the '<- Level ->' button and the left/right arrows to select a level. Go back to the Start/Cont button and press OK to begin.
  • Ability to pause using Ctrl-Q on keyboard or the Pause button on the MVP remote. Pressing ESC (or Back/Exit on MVP remote) has the same effect. NOTE - using ESC to leave the plugin will lose the game position altogether and you'll start a new game when returning.
  • Ability to 'pencil in' numbers by pressing Ctrl-B on the keyboard or the Blue button on MVP remote. This is a 'toggle' option so turn it off again when you want to enter a number you're sure of. Up to 3 'penciled' numbers are allowed for a cell.
Font colours and grid background colour can be changed in skin.xml.
Code:
<TextStyle name="PrefilledNumbers" color="Red" typeFace="Tahoma" size="16" style="bold"/>
<TextStyle name="PlayerNumbers" color="Blue" typeFace="Tahoma" size="16" style="bold"/>
<TextStyle name="PencilledNumbers" color="Magenta" typeFace="Tahoma" size="12" style="bold"/>

...
<SpecialElement name="SuDokuGrid" xPos="220" yPos="70" cellWidth="40" cellHeight="40" xCellcount="9" yCellcount="9" lineWidth="1" fillColour="LightGray"/>
Don't mess about with the SuDokuGrid special element attributes xCellCount and yCellCount - odd things may happen.

The grid generator is still flawed and you will often end up with an 'either/or' situation when it comes to filling the last few cells. I've changed the logic to acknowledge a 'grid complete' even if it doesn't exactly match the original. I'll look at generating 'single solution' grids.

To use - create a folder called SuDoku in your skin folder and drop the skin.xml in there. Put the plugin dll in your plugins folder, start Config, enable the plugin and click OK.

Cheers,
Brian
Beautiful and works great, many thanks for this.

I changed all the colours and fonts, all is fine. Last suggestion for a future upgrade if there is one: can we configure the color of the circle on the selected cell (currently black)?
urso Wrote:Beautiful and works great, many thanks for this.
Glad you like it.

Quote:Last suggestion for a future upgrade if there is one: can we configure the color of the circle on the selected cell (currently black)?
Hadn't tought of that - will do.

Cheers,
Brian
I just installed this version. I will test it out soon. Thanks!
Can someone put up a screen shot? Dubya
Dubya Wrote:Can someone put up a screen shot? Dubya
Here you go. You'll see the level is set for Mild with 'rotational symmetry'. The red numbers are prefilled, blue are the player's answers and magenta (the two squares filled with 12) are the 'pencilled in' possible numbers. Colours are defined in the skin.xml (except the circular 'cursor' fixed at black in this version).

Reminder of rules - each row and column must contain the numbers 1 - 9 with no repetition. Also each 'region' (3x3 grid) can have no repetition.

Cheers,
Brian
Just installed the plugin...really like it.

A couple of requests:

1. Ability to save the game when I exit the plugin.

2. Ability to pencil in more than three numbers.
Richard Wrote:Just installed the plugin...really like it.
Cheers!

Quote:1. Ability to save the game when I exit the plugin.
The save game option is on my list of things to do (the code has a SaveGame() method in it, I just haven't implemented it yet).

Quote:2. Ability to pencil in more than three numbers.
Tricky. The more numbers, the smaller the font needs to be. Possibly OK on a PC monitor but I doubt if anything more than four would be usable for MVP users. I'll experiment.

Cheers,
Brian
sorry if this is being ignorant but the zip file does not hold the skin.xml..?
Anyone else have a SuDoku board burned into their TV yet? Smile

Digital
Pages: 1 2