tap does something when the screen is tapped

All the commands that are "inside" tap will happen each time the screen is tapped.

tap ->

The spaces (or indentation) in front of the feed() command are what makes it "inside" tap. Try removing them and see what happens!

You can put as many commands as you like inside one tap:

tap -> feed() vibrate()

Just make sure the indentation lines up perfectly, or the computer will get confused!

If you have a visible turtle in your game, you can also do use tap on the turtle:

turtle.tap ->

More info

On the Doggie And Me app, tap is a wrapper for the web standard touchstart event.

This means that the tap location is where the dog started touching the screen, and it works well for "smudgy" touches.

In this simulated environment, tap is actually the same as click, for simplicity.