Completing a row
The spaces in the game are held using a 2 dimensional array, when your Tetrimino (Tetris shapes) has been placed the game checks over each row to see if all of the indexes in that row are equal to 1 (1 being occupied, 0 being empty).
In the event of a completed row, the game adds all of the Minos (singular cubes of a Tetrimino) in the row to an array, this array is looped over in the Tick function to create the destroy animation. The index in the array is used as the time offset to create the delay before spinning.
The code snippet below is called in the Tick function, passing in the index and delta time as parameters.


Extra Time
In the original Tetris, when your Tetrimino can't move down any further, but has room to move left or right, you have a tiny amount of time where you can shift your Tetrimino across. I added this into my Tetris.
During the "extra time" the game runs a function checking if all of the Minos can move down and if they are not at the bottom of the grid. If both of these conditions are true for all of the Minos then the extra time is cancelled and the Tetrimino will continue to move down.
​
The code snippet below shows the extra time check.


Auto movement
During testing, I found occasionally I wanted to hold the movement input as tapping it to go from one side to the other became tedious and frustrating.
To implement this, I used an int value which ranged from -1 (left), to 1 (right), if the player holds down a movement key, a timer is decremented, if the value is below 0 then the Tetrimino attempts to move in the chosen direction.
​
The code snippet below shows the Tick function of the movement class.
