the blue snail is only allowed to take one step to one of the eight boxes around and only once, and he has to go through all the boxes to reach the pink snail
here is what i have done so far, there’s something wrong, and i highlight the place where i don’t feel right, please tell me what the errors are
thanks
<script>
document.write(‘<table style=cursorointer;cursor:hand border=2 cellpadding=0 cellspacing=0>’)
var squarenum=0;
var curnum=0;
curcol=”#996633″;
for(var count1=0; count1<8; count1++){
document.write(‘<tr>’)
if(curcol==”#996633″) {curcol=”#663300″} else curcol=”#996633″;
for(var count=0; count<8; count++){
if(curcol==”#996633″) {curcol=”#663300″} else curcol=”#996633″;
[COLOR=Navy]document.write(‘<td bgcolor=’+curcol+’ id=’+curnum+’ name=’+squarenum+’ width=50 height=50 onclick=”moveto(this);”> </td>’);
curnum++;
squarenum++
}
document.write(‘</tr>’)
curnum+=;
}
document.write(‘</table>’)
document.getElementById(90).innerHTML=”<img width=40 height=40 src=romeo.gif>”;
document.getElementById(90).bgColor=”#FF99FF”;
var squares=new Array(true);
var score=0;
var where;
var oldwhere=0;
[COLOR=Navy]function moveto(square){
where=square.id;
if ((oldwhere==where- || oldwhere==where- || oldwhere==where- || oldwhere==where- || oldwhere- ==where || oldwhere- ==where || oldwhere- ==where || oldwhere- ==where))
{
score++;
document.getElementById(“scorey”).innerHTML=score;
document.getElementById(oldwhere).innerHTML=” “;
document.getElementById(where).innerHTML=”<img src=romeo.gif width=40 height=40>”;
document.getElementById(where).bgColor=”#FF99FF”;
oldwhere=where;
squares[square.name]=true;
}
for (var i=0; i<63; i++) if (squares[i]!=true) var stuffed=true
if (stuffed!=true) {alert(“You finally see Juliet again in only “+score+” moves!”);window.location.href=window.location.href;}
}
</script>
[upl-file uuid=fe60302b-0214-41f4-a260-1216fc94c00a size=6kB]back%20copy.gif[/upl-file]