# Follow me on youtube channel Phy Tu
# Help with programming on Python, school math, physics
# https://www.youtube.com/channel/UCP5ycahCEZ24qmRRgNnko5Q
# The pet must win the race.
# Runners should touch their teams mark and run back.
def Go(event):
referee = pet.findNearestByType("wizard")
# If the referee is speaker and the message is "Start":
if event.speaker==referee and event.message=="Start":
# Make the pet run to the red mark.
pet.moveXY(54,27)
# Then run back.
pet.moveXY(6,27)
# Assign the onHear function to handle "hear" events.
pet.on("hear",Go)