This simulates a Pellican Crossing traffic light sequence. When you click the green flag the red light shows, and then after a delay the light cycles to green and then back again. If you click on the Crossing button, the lights will cycle so it is safe for the boy to cross.
Designed for Yr6 Computing. See if you can work out how the sequence works.