Skip to content

Instantly share code, notes, and snippets.

@xulapp
Created September 21, 2011 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xulapp/1232335 to your computer and use it in GitHub Desktop.
Save xulapp/1232335 to your computer and use it in GitHub Desktop.
Lights Out in 213 bytes
<body id=B onload="a=f=function(n,_,g){a^=(1<<n)*67.515625;for(j=30;j;B.innerHTML=g?_:'Great!!')_+=j--%6?(a>>j&1?g='●':'○').link('javascript:f('+j+',++c)'):'<br>'};for(i=30;i;)i--%6&Math.random(c=0)<.5&&f(i)">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment