We now have written a reasonably complete, reasonably fun
game of Tetris. Congratulations!
That said, our game is somewhat minimalist, leaving many opportunities for additional work, some of it relatively easy, some of it quite hard and requiring that you learn challenging features through self-study. Here are some idea, roughly in increasing order of difficulty:
Hard drop: hitting a key (such as space bar) immediately drops a piece as far as it can go and places it on the board;
A "Pause" feature;
Dual rotation (adding clockwise rotation in addition to counterclockwise rotation);
"Splash screens" with help instructions;
Levels of play with increasing difficulty (dropping
faster, with more difficult piece types, and with some cells randomly
filled, etc);
More attractive pieces (look into online documentation for Tkinter's canvas for some interesting options);
(Moderate) Piece Preview (so you can see what the next piece will be before it arrives);
(Moderate) High scores list (even better (but also harder): stored on the web
and shared across users);
(Moderate) A Piece editor (so you can create new types of pieces);
(Moderate/Hard) Integration with other Tkinter widgets (buttons, menus, etc);
(Very Hard) Making this implementation object-oriented (that is, using classes) -- for example, adding a Piece class with LPiece, SPiece, and so on as subclasses, and then actual falling pieces as instances; and
(Very Hard) Network-based multiplayer versions.
Enjoy!!!
David Kosbie |