'); 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\tYou are not using a browser that can deal with the latest JavaScript 1.1 language.\t\n\tSorry, you can't play this version of the game.\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=eblankx; clicky=eblanky; // choose randomly whether to fake a move in the // same row or the same column as the eblank // .. 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 eblank { // keep selecting a new X position until we get one // that is neither the eblank square nor going to give // us a result the same as the previous move while ((clickx==eblankx) || (clickx==prevx)) { clickx=Math.floor(Math.random()*gridwidth); } // we set the column to be the same as the eblank square clicky=eblanky; } else // fake a move in the same row as the eblank { // keep selecing a new Y position until we get one // that is neither the eblank square nor going to give // us a result the same as the previous move while ((clicky==eblanky) || (clicky==prevy)) { clicky=Math.floor(Math.random()*gridheight); } // we set the row to be the same as the eblank square clickx=eblankx; } // 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=eblankx; prevy=eblanky; // 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 // eblockXY (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 eblockXY graphic. // For example, if position at00 held eblock30.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=eblock.lastIndexOf(".")-2; // work out the name where this image starts out name2="at"+eblock.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"+eblankx+eblanky; document.images[replace].src=schluss.src; alert("\n\n\tCONGRATULATIONS!\n\tYou solved the puzzle in "+moves+" moves.\n\n\tPress the OK button and try again.\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('
GAME CODE COPYRIGHT PORT80
FIND OUT HOW TO MAKE YOUR OWN 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(' '); } document.writeln('
(',x,',',y,')
'); document.write(''); document.write(''); document.writeln('
'); document.writeln(''); } // Panik-Button hinzugefuegt function panic() { if (playing) { var feld=""; for(y=0;y<3;y++) { for(x=0;x<6;x++) { feld="eblock"+x+y+".jpg" replace="at"+x+y; document.images[replace].src=feld; } } alert("\n\n\tSHAME UPON YOU !\n\n\tYou gave up after only "+moves+" moves.\n\n\tThe Moosequeen laughs at you.\t\t\n\n"); moves=0; playing=false; } } // 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 // // // ///////////////////////////////////////////////////////////////////////////
The Moosequeen's Easy Moose Puzzle

Before you begin this traditional puzzle you must shuffle the pieces around by pressing the »START« button below the game board. The task is to then click on the individual pieces to slide them either up, down, left or right, manipulating them so that the board once again shows the correctly arranged image.

Good luck!

Created by port80 the internet consultancy limited

>

Back to Canada Impressions