What variables control the moving and location of the cards? Are the values of those variables changed by the code?
Is repaint() called after the changes are made?