A simple tetris implementation—using the HTML5 canvas element—that lets you choose from differentmodes for selecting the next piece. You might have the most fun with “nice” and “evil”.Also, “autopilot” can be fun to watch.
Move the shapes with the arrow keys. Rotate piece with the up key, z, and x. Pause the game with p and toggle autopilot mode with the back tick (the key that has ~ on it).