462,168 Members | 630 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,168 IT Pros & Developers. It's quick & easy.

# What does whichkey>=48...<= 57 mean in a 3x3 sudoku game?

 100+ P: 785 In a 3x3 sudoku JavaScript with images, what is 48? and 57? I'm trying to convert a 3x3 sudoku to a 2x2. I don't understand why 48 can't be say, 46 or 45; why 57 can't be 54, etc. Its the numbers I don't understand. Expand|Select|Wrap|Line Numbers function KeyDown(whichkey) { if (IsOver) return;   if (I_Sel==-1) return;   if ((whichkey>=48)&&(whichkey<=57))   { Fld[I_Sel][J_Sel][K_Sel][L_Sel]=48-whichkey;     window.document.images[4*I_Sel+4*J_Sel+K_Sel+2*L_Sel].src = NPic[whichkey-48].src;     I_Sel=-1;   }    if (IsSolved())   { IsOver=true;     Now = new Date();     EndTime = Now.getTime() / 1000;     i=Math.floor(EndTime - StartTime);     if (window.opener)     { if (window.opener.SetHighscores)         window.opener.SetHighscores("Sudoku","",i,-1);     }     alert("Super, you solved this game in "+i+ " seconds !");   } }   Thanks! Mar 5 '07 #1