Pygame code integrated