This code addresses an issue I have with a bigger project, but why does this program wait until the entire loop is done for it to change colors? The rectangle should change colors 1000 times everytime the entire for loop is done, but it only changes it once.