Use cursor keys ▲▶▼◀ SPACE or
IJKLM SPACE to control the game.
About performance
Other versions used absolute positioned images or divs to make up the blocks.
Using a table with CSS-styled cell borders as a grid seemed logical.
I tried different ways of accessing the table cells:
getElementsByTagName('td') (slow!)
nextSibling
table.rows[y].cells[x]
childNodes
We're talking 30-40 milliseconds here BTW, not microseconds (remember, 2004) to iterate
through the cells. Accessing it by table.rows[y].cells[x]
was almost as fast as nextSibling but more convenient in terms of code-size and readability :-)
The same is true for using table methods insertRow and deleteRow. Less code and more speed than moving the cells individually.
About size
Nowadays you can bring it down to 1 KB or even 512 bytes, but I did not want to give up on the scoring system, preview and VIM-bindings :-) Another time maybe!
The code
The code is 45 lines and ofcourse a great messobfuscated but pretty readable if you beautify it.