
Hi obelix,
in your autorun.js there is a function "target.moveCursor" wherein I made an addition that moves the cursor to the next field OMITTING fields with fixed digits - even if there are several in a row...
(... only got the small and rare drawback that a "free" field
surrounded by fixed digits has to be aimed at from a certain "angle". But as cursor moves are still quite slow on eInk I like it better this way.)
If you want to check and integrate it in SUDOKU I'd be happy if you do so!
Here's the code (that anybody might exchange in his autorun.js - but at his own risk):
(This is
not PHP Code but looks better this way: )
PHP Code:
...
if (!this.isMenu){
if (direction=="right")
{
this.posX=this.posX+1;
if (this.posX>8) this.posX=0;
// ======================================= NEW:
var id7 = "fixDigit"+this.posY+this.posX;
while (this[id7].u>0) {
this.posX=this.posX+1;
if (this.posX>8) this.posX=0;
id7 = "fixDigit"+this.posY+this.posX; } // ===
}
if (direction=="left")
{
this.posX=this.posX-1;
if (this.posX<0) this.posX=8;
// ======================================= NEW:
var id7 = "fixDigit"+this.posY+this.posX;
while (this[id7].u>0) {
this.posX=this.posX-1;
if (this.posX<0) this.posX=8;
id7 = "fixDigit"+this.posY+this.posX; } // ===
}
if (direction=="up")
{
this.posY=this.posY-1;
if (this.posY<0) this.posY=8;
// ======================================= NEW:
var id7 = "fixDigit"+this.posY+this.posX;
while (this[id7].u>0) {
this.posY=this.posY-1;
if (this.posY<0) this.posY=8;
id7 = "fixDigit"+this.posY+this.posX; } // ===
}
if (direction=="down")
{
this.posY=this.posY+1;
if (this.posY>8) this.posY=0;
// ======================================= NEW:
var id7 = "fixDigit"+this.posY+this.posX;
while (this[id7].u>0) {
this.posY=this.posY+1;
if (this.posY>8) this.posY=0;
id7 = "fixDigit"+this.posY+this.posX; } // ===
}
this.drawGridCursor(this.posX,this.posY);
}
...
(I only pasted relevant parts of the function.)