First we check if it’s time to move a block down. For this we need to increase the value of ‘forceDownCounter’. If it is higher than the current game speed, the block should be moved downwards:
forceDownCounter += Time.d();
if(forceDownCounter > Score.getSpeed())
{
if(canMove(currentBlock, D_DOWN))
5 {
currentBlock.move(D_DOWN);
forceDownCounter = 0;
}
}
10