Skip to content

Instantly share code, notes, and snippets.

@tyage
Created September 21, 2011 15:38
Show Gist options
  • Save tyage/1232409 to your computer and use it in GitHub Desktop.
Save tyage/1232409 to your computer and use it in GitHub Desktop.
golf
//クリックで操作
//タイトルバーに表示
c=0,m=6,onclick=function(){function r(n){n>0&&setTimeout(function(){w(++c);r(n-1)},300)||c>=m&&alert(c-m?"lose":"win")}r(Math.random()*m)};function w(){g=[];g[c]=".";g[m]="_";document.title=(c?"|":"/")+g.join("-")}w()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment