Skip to content

Commit

Permalink
Update Tetris to 300 Bytes ES6
Browse files Browse the repository at this point in the history
  • Loading branch information
aemkei authored Feb 15, 2017
1 parent a3e95db commit 44b895d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions shortest_tetris.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
<!-- Intro- Very short and simplified variant of the classic tetris game. -->
<!-- Details- https://gist.github.com/aemkei/1672254 -->

<body onload='setInterval(onkeydown=function(d){for(d=d||5,(e=d.keyCode)&amp;&amp;(d=e%2?e%3?-1:1:5),t="",d=c-d,e=a|b<<d,0>d|a&amp;b<<d&amp;&amp;(a=e=parseInt((a|b<<c).toString(d=32).replace(/v/,""),d),b=new Date%2?1:3),c=d,i=1;31>i;)t+=".O"[1&amp;(1<<30|e).toString(2)[i]]+(i++%5?"":"\n");O.innerHTML=t},888,a=0,b=3,c=32)'>
<pre id="O"></pre>
</body>

<body onload='setInterval(onkeydown=d=>{for(d=d||5,(e=d.keyCode)&&(d=e%2?e%3?-1:1:5),t="",d=c-d,e=a|b<<d,0>d|a&b<<d&&(a=e=parseInt((a|b<<c).toString(d=32).replace(/v/,""),d),b=new Date%2?1:3),c=d,i=1;31>i;)O.innerHTML=t+=".#"[1&(1<<30|e).toString(2)[i]]+(i++%5?"":"\n")},666,a=0,b=3,c=32)'><pre id=O>

0 comments on commit 44b895d

Please sign in to comment.