if(loopCount % (20 - loopCount / 100) == 0) {
if(dropBlock() == false) {
mode = -1;
loopCount = 1;
}
if(loopCount == 1900)
loopCount--;
}
loopCount++;
A tetris program from a book written by java. I just can't understand why using such a piece of code to control the droping speed of a block and how it works. Thank you !
The initial value of loopCount is 1 and dropBlock will return false if the game ends. This piece is contained in the main loop. And the mode is not relevant. I am sorry but I just can't gvie the whole program here.