I added a little tweak that basically does not spawn more blocks if there is no the blocks already on the field have no where to move.
I did this because that is what is implemented in the game