I'm working on a program right now that starts by creating 28 rectangle objects in random positions and animates them to bounce in the window. I'm trying make it so that as there is input (a key press currently), one rectangle is removed. And the count of removed rectangles goes up by one accordingly. The other rectangles continue to animate, until they are all removed.
But the problem I'm running into is that when is removing, it is doing it multiple times for ever key press, when it's supposed to do one. I think it has something to do with the frame rate but I'm not sure.