You're also calling SDL_Flip twice (once in main and once at the end of make_move); I'm not sure what effect this will have. SDL_Flip is meant for when you have a hardware surface (SDL_HWSURFACE),...