'); hintwindow.document.writeln('
completed puzzle
'); hintwindow.document.writeln(''); hintwindow.document.writeln(''); hintwindow.document.close(); } // RANDOMSLIDE: // iterations: the number of times to do a single random move function randomSlide(iterations) { if (version=="no") { alert("\n\n\tTú no estas usando un navegador con le lenguaje JavaScript 1.1.\t\n\tLo siento, tú no puedes jugar la version de este juego.\t\t\n\n"); } else { // suspend play while we do it playing=false; // count down the iterations while (iterations--) { // initially we set an invalid move because this routine // just fakes mouse clicks at randomly selected positions // and we want to select a valid move randomly from the start clickx=blankx; clicky=blanky; // choose randomly whether to fake a move in the // same row or the same column as the blank // .. note that we could have just gone on picking // completely random moves until we got a valid one, // but when we can be sensible about it, what's the point?! if (Math.random()>.5) // fake a move in the same column as the blank { // keep selecting a new X position until we get one // that is neither the blank square nor going to give // us a result the same as the previous move while ((clickx==blankx) || (clickx==prevx)) { clickx=Math.floor(Math.random()*gridwidth); } // we set the column to be the same as the blank square clicky=blanky; } else // fake a move in the same row as the blank { // keep selecing a new Y position until we get one // that is neither the blank square nor going to give // us a result the same as the previous move while ((clicky==blanky) || (clicky==prevy)) { clicky=Math.floor(Math.random()*gridheight); } // we set the row to be the same as the blank square clickx=blankx; } // set variables so that when we do another random move we can // make sure that we don't end up just shuffling the same pieces // back and forth continually prevx=blankx; prevy=blanky; // we picked our place, let's fake the move - the true value is // passed so that our slide function knows it is being faked slide(clickx,clicky,true); } // check to see if we solved it by shuffling checkSolved(); // resume (or start) play as we have finished shuffling playing=true; } } // CHECKSOLVED: function checkSolved() { // This routine works by virtue of the fact that we have named // the images using the convention atXY (where X and Y are the numbers // of the row and column so that at00 is the top left square position) // and that the actual graphics are sourced from images with the name // blockXY (where X and Y are the numbers of the row and column where // the image is originally found). Therefore the puzzle is solved when // all atXY positions are filled by the corresponding blockXY graphic. // For example, if position at00 held block30.gif then we know the puzzle // has not been solved. // start off by assuming the puzzle has been solved solved=true; // sweep down the rows of the board.. for(y=0;y 12) start=block.lastIndexOf(".")-2; // work out the name where this image starts out name2="at"+block.substring(start,start+2); // if this image didn't start out here, we've not solved the puzzle if (name1!=name2) solved=false; } } // got through all the positions without declaring that the // puzzled had not been solved, therefore by a simple process // of elimination.. we've solved it! if (solved) { // alert us to the fact we completed the puzzle and tell us // how many moves were counted - JavaScript is held at this // statement until the OK box is clicked in the alert window replace="at"+blankx+blanky; document.images[replace].src=gfxdir+"/block"+blankx+blanky+"."+gfxtype; alert("\n\n\tFELICITACIONES!\n\tHaz resuelto el Puzzle en "+moves+" movimientos.\n\n\tPresiona el boton de OK, para empezar de nuevo.\t\t\n\n"); // reset the move counter to zero and indicate that we've finished playing moves=0; playing=false; } } // DISPLAYGRID: function displaygrid() { // This makes sure that only browsers that can do the game // will actually see the grid. Others get a message saying // that they can't play - could suggest an alternative. var piece=""; document.writeln('
'); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.write(' '); document.writeln(' '); document.writeln(''); document.writeln('
CINE - PUZZLE
'); document.writeln(' '); document.writeln('

'); // sweep down the rows of the board.. for(y=0;y'); // ..and across the columns in the current row for(x=0;x(',x,',',y,')'); } else { document.writeln(' '); } } } document.writeln('
(',x,',',y,')
'); if (hintbutton=="yes") { document.write(''); } document.writeln('
'); document.writeln(''); } // that's all folks --> /////////////////////////////////////////////////////////////////////////// // // // DO NOT CHANGE ANYTHING ABOVE THIS POINT OTHER // // THAN THE VARIABLE BLOCK IF REQUIRED TO CHANGE // // THE SIZE OF THE GAME GRID OR THE PIECES // // // ///////////////////////////////////////////////////////////////////////////

HOME    EN CARTELERA    CINES   PRÓXIMAMENTE    RECOMENDAMOS    ESPECIAL
EN VIDEO    NOTICIAS    EN CABLE    TRIVIA    FILMOTECAS    BUZÓN    ENCUESTA

     

E.T.

Arma el rompecabeza

  1. Espere a que termine de cargar la página
  2. Presione Desordenar
  3. Haga click en una parte del rompecabezas para moverlo hacia el espacio en blanco (obviamente éste debe estar ya sea en la misma fila o columna que el espacio en blanco).
  4. Siga moviendo de igual manera todas las piezas hasta que termine de recrear la figura original/ armar todo el puzzle
  5. Bastante frustrante,no?

« regresar