Workshop › Frogger-style Crossing › Step 15 of 22
A frog on a log moves with it. If the log carries it past the edge of the screen, that is a splash too.
```js
// The log carries the frog; being carried off the screen is a splash too.
frog.x += lane.speed
if (frog.x < -0.5 || frog.x > COLS - 0.5) die()
```In update, under the log check, write the comment and the two lines.
Skills: Velocity and gravity
← Stay on the logs Back in line →