-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcode.min.js
1 lines (1 loc) · 1.19 KB
/
code.min.js
1
!function(n,r,o,t,f,u,e){var c,i,a,m,s,l,w,d,p,g,k=1,L=function(r,o){return n[t](s+r+o)},T=function(n,r){return L(n,r)[f]===l[w]},b=function(){for(w=k=(k+1)%2,d=0,m[u]=m[f]=l[w=(w+1)%2],c=1;7>c;c++)for(i=1;8>i;i++)L(c,i)[f]=""},v=function(o,s,p){p>0&&(L(p,s)[f]=""),L(p+1,s)[f]=l[w],p===o-1?function(n,r){return function(n,r){for(c=r-1;c>0&&T(n,c);c--);for(i=r+1;8>i&&T(n,i);i++);return i-c>4}(n,r)||function(n,r){for(a=n+1;7>a&&T(a,r);a++);return a-n>3}(n,r)||function(n,r){for(c=n-1,i=r-1;c>0&&!(1>i)&&T(c,i);c--)i--;for(a=n+1,i=r+1;7>a&&!(i>7)&&T(a,i);a++)i++;return a-c>4}(n,r)||function(n,r){for(c=n-1,i=r+1;c>0&&!(i>7)&&T(c,i);c--)i++;for(a=n+1,i=r-1;7>a&&!(1>i)&&T(a,i);a++)i--;return a-c>4}(n,r)}(o,s)?d=1&&r[e](n[t](g)[u].replace("%s",l[w].toLowerCase()))&&b():m[u]=m[f]=l[w=(w+1)%2]:setTimeout(function(){v(o,s,p+1)},20)};return function(a,w,k,T,y,B){for(s=k,p=a,g=w,m=n[t](k),l=[n[t](y)[u],n[t](B)[u]],c=1;7>c;c++)for(i=1;8>i;i++)L(c,i)[o]=function(n,r){return function(){if(!d)for(r=6;r>0;r--)if(!L(r,n)[f]){v(r,n,0);break}}}(i);n[t](T)[o]=function(){r[e](n[t](p)[u])&&b()},b()}}(document,window,"onclick","getElementById","className","innerHTML","confirm")("newgame","won","color","restart","p1","p2");