1. Tetris-Game


Description


  Tetris is a game in which the player moves and rotates dropping pieces so that they form solid lines. Completely filled lines are cleared, giving points to the player. The Wikipedia page for Tetris is a very good source of information about the various incarnations of the game, if you have questions. There are many free versions of Tetris online that you could look at such as www.tetrislive.com

Game Pieces

Our abstraction will be that a Piece object represents a single Tetris piece with position and rotational state.A piece can be rotated 90° clockwise. Enough rotations get you back to the original orientation, Each Tetris piece has one (the O), or four (the L, J, T, I, S and Z) distinct rotational states as shown on the next page. At the top of the diagram notice the increasing series of numbers 0 – 3 which represent the various rotational states. New pieces are initialized to state zero. Clockwise rotations increment the rotational state.

pieces

game-play

Please check out the Github link below for more information.