So i'm following Ian Cinnamon's book "Video Game Programming for the Evil Genius" and currently i'm on the racing game section. I've copy-pasted his code into my program just to check if it works, and it doesn't. The game starts flashing and flickering randomly, i'm guessing it has something to do with the repaint() functions in the Move1 and Move2 threads. But I have no idea how to fix it, and he doesn't acknowledge the error in his book. Here is the code. http://pastebin.com/rzq1JNx0
Also, my friend told me to double-buffer it, but i have no idea how to go about implementing that. Any ideas?