Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A really small Rubik's Cube timer. Demo:
<h1 id="a">0.000</h1><p id="s"></p>
function z(){for(c=b=j=25,r=Math.random,s[i='innerHTML']='';j;c+b-5|c-m&&b-m?s[i]+="URFBLD"[j--,c=b,b=m]+" 2'"[0|r()*3]+" ":0)m=0|r()*6}z(),k=onkeyup=function(x){x.which^32||k?(S=new Date,T=setInterval("a[i]=(new Date-S)/1e3")):(clearInterval(T),z());k=!k}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.