Pygame solution