A square is used as one of four parts of a piece as well as one of 68 blocks that comprise the border of the board. An individual square can only move when a piece tells it to move and the position on the board that it wants to move into is not occupied. Therefore, a square is commanded by the piece and also communicates with the board to find out if its desired move is legal.

The only squares that are actively checking the board and moving at any given moment are the squares which comprise the "current piece" - that piece which is falling down the screen.

If a piece asks its squares whether they can move and one or more squares say "no," the piece as a whole can no longer move and therefore instructs its squares to add themselves to the board (graphically) at their current positions. At that time the squares also must add themselves to the memory structure of the board (the 2D array) so that future squares know not to move into those positions!

contained by: Board
implements: TetrisConstants