This is the full code for the very bad game example.
import pgzrun
from random import randint
from pgzero.builtins import Actor, animate, keyboard
apple = Actor('apple')
def draw():
screen.clear()
apple.draw()
def place_apple():
apple.x = randint(10, 800)
apple.y = randint(10, 600)
def on_mouse_down(pos):
if apple.collidepont(pos):
print("Good shot!")
place_apple()
else:
print("You missed!")
quit()
place_apple()
pgzrun.go()
the screen.clear() isn't working and apple = actor("apple") also isn't working. I have no idea why. Please help me!