View Single Post
Old 03-10-2008, 04:19 AM   #57
Clemenseken
eWriter
Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.Clemenseken can program the VCR without an owner's manual.
 
Clemenseken's Avatar
 
Posts: 267
Karma: 175607
Join Date: May 2007
Location: Frankfurt, FRG
Device: PB-IQ / Sony PRS-500
Post Sudoku: Cursor jumps over fixed digits...

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>8this.posX=0;
// ======================================= NEW:
   
var id7 "fixDigit"+this.posY+this.posX;
   while (
this[id7].u>0)    {
   
this.posX=this.posX+1;
   if (
this.posX>8this.posX=0;
   
id7 "fixDigit"+this.posY+this.posX;  } // ===
   
}
   
if (
direction=="left")
  {
   
this.posX=this.posX-1;
   if (
this.posX<0this.posX=8;
// ======================================= NEW:
   
var id7 "fixDigit"+this.posY+this.posX;
   while (
this[id7].u>0)    {
   
this.posX=this.posX-1;
   if (
this.posX<0this.posX=8;
   
id7 "fixDigit"+this.posY+this.posX;  } // ===
   
}
   
if (
direction=="up")
  {
   
this.posY=this.posY-1;
   if (
this.posY<0this.posY=8;
// ======================================= NEW:
   
var id7 "fixDigit"+this.posY+this.posX;
   while (
this[id7].u>0)    {
   
this.posY=this.posY-1;
   if (
this.posY<0this.posY=8;
   
id7 "fixDigit"+this.posY+this.posX;  } // ===
   
}
   
if (
direction=="down")
  {
   
this.posY=this.posY+1;
   if (
this.posY>8this.posY=0;
// ======================================= NEW:
    
var id7 "fixDigit"+this.posY+this.posX;
    while (
this[id7].u>0)    {
    
this.posY=this.posY+1;
    if (
this.posY>8this.posY=0;
    
id7 "fixDigit"+this.posY+this.posX;  } // ===
   
}
this.drawGridCursor(this.posX,this.posY);
}
... 
(I only pasted relevant parts of the function.)
Clemenseken is offline   Reply With Quote