Tetris

A simple tetris implementation—using the HTML5 canvas element—that lets you choose from different modes for selecting the next piece. You might have the most fun with “nice” and “evil”. Also, “autopilot” can be fun to watch.

If you can read this, your browser doesn't support the canvas element. Please upgrade to a better browser.

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).

TODO:
  • Better autopilot algo
  • Make sure piece rotations go the right way
  • Allow rotating while stuck to the side
blog comments powered by Disqus

Peter Coles

Peter Coles

is a software engineer who lives in NYC, worked at Hunch/eBayNYC, and blogs here.
More about Peter »

@lethys · github · rss

It’s time to get big money out of politics. Join the kick-started campaign to put government back in the hands of the people. Pledge mayday.us now