I have this code for a simple game for pygame or pgzero:
apple = Actor(\'apple\') def draw(): screen.clear() apple.draw() def place_apple(): apple.x