Where to go now

To improve your skills, you could clean the code a bit, using constants where required. This is not mandatory, but using FIELD_WIDTH and FIELD_HEIGHT rather than 10 and 20 here and there could improve code readability. It would also be nice if you decrease the timer that controls tetrominoes' falling speed every, let's say, ten completed lines.

You can create two new class level variables called completedLines (starting at zero and increasing every time the player completes a line) and fallingTimer (to be set at 500 and used rather than new Timer(500)). Then every time completedLines is a multiple of ten (use modulo), stop the timer using stop method just like you made it start with start method, remove the listener, decrease fallingTimer ...

Get Flash Game Development by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.