text: function l(){return Math.floor(Math.random()*a)}function k(b,h,k,l){++e,function m(b,h){if(b<0||b>=a||h<0||h>=a)--e||(--d,i());else{var n=t[f][0][f][h][f][b];n[g]=="o"?(n[g]="",--c,--e,i(),j(b,h)):(n[g]="b",setTimeout(function(){n[g]="",k!=0?m(b+k,h):m(b,h+l)},25))}}(b,h)}function j(a,b){k(a,b,-1,0),k(a,b,1,0),k(a,b,0,-1),k(a,b,0,1)}function i(){u.innerHTML=!d&&c?"You Lose!":c?"Moves: "+d+" &mdash; Pieces: "+c:"You Win!"}var a=50,c=50,d=8,e=0,f="children",g="className",h="parentNode";b.innerHTML='<style>body{background:#111;margin:10px;}h2{color:#EEE}table{border-collapse:collapse;border-spacing:0}td{border:1px solid #333;width:8px;height:8px}td:hover{background:#444}.b{background:#EEE}.o{background:#F80}</style><h2 id="u">Click Any Square To Play</h2><table id="t">'+Array(a+1).join("<tr>"+Array(a+1).join("<td></td>")+"</tr>")+"</table>",t.onclick=function(a){var b=a.target;d&&c&&!e&&j(b.cellIndex,b[h].rowIndex)};for(var m=0;m<c;++m)for(;;){var n=t[f][0][f][l()][f][l()];if(n[g]!="o"){n[g]="o";break}}
  