In Tetris, the main objective of the game is to rotate and move pieces (Tetriminos) of various shapes within a playing field (well or matrix) to create a row of blocks without gaps. When a full row is created, it is deleted from the playing field and your score is increased by one. In our version of the game, there won't be a win condition (although it would be simple to add it).
It's important to understand the rules and mechanics of the game because the code uses algorithms for concepts such as collision detection and scoring. Understanding the goal of a function helps you understand the code within. I recommend you give it a try online if you need to brush up on your Tetris skills. You can play it at https://emulatoronline.com/nes-games/classic-tetris/ without having to install Adobe Flash. It looks just like the original Nintendo Version:

The version we'll be working with won't contain the piece counters, levels, or points (we're sticking to line counts), but it will operate in the same way.