Skip to main content
Engineering LibreTexts

8.2: Some Tetromino Nomenclature

  • Page ID
    13605
  • In this chapter, I have come up with a set of terms for the different things in the game program.

    • Board – The board is made up of 10 x 20 spaces that the blocks fall and stack up in.
    • Box – A box is a single filled-in square space on the board.
    • Piece – The things that fall from the top of the board that the player can rotate and position. Each piece has a shape and is made up of 4 boxes.
    • Shape – The shapes are the different types of pieces in the game. The names of the shapes are T, S, Z, J, L, I, and O.

    Figure 30

    • Template – A list of shape data structures that represents all the possible rotations of a shape. These are store in variables with names like S_SHAPE_TEMPLATE or J_SHAPE_TEMPLATE.
    • Landed – When a piece has either reached the bottom of the board or is touching a box on the board, we say that the piece has landed. At that point, the next piece should start falling.