Raziel
The logic is -
The chess are falling from top to buttom, so checking chess from bottom to top (see the y-index) . If the chess could fall down, pull it down, ...until it can not fall down.
Or you could just use grid move repeat to replace "while it can fall down".