Created
January 31, 2010 16:24
-
-
Save gaving/291133 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
key: function(e) { | |
switch(e.charCode || e.keyCode) { | |
case 74: case 106: matrix.moveLeft(); break; // J | |
case 76: case 108: matrix.moveRight(); break; // L | |
case 75: case 107: matrix.moveDown(); break; // K | |
case 73: case 105: matrix.rotate(); break; // I | |
} | |
return false; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment