Simple game loop implemented in python using OpenCV