Crossroads
Run two gates at a crossing from one program. Let one road go at a time, with no crashes.
Medium – Hard3 levels2 devices
Play this missionNo hardware, no sign-up: press Play and every mission runs on 3D simulated devices.
Two roads cross, each with its own gate. Cars reach both gates at the same time, so your program has to let one road go at a time. Two cars in the junction crash!
What you'll learn
- Multiple devices: one program drives two gates
- Coordination: open the other gate only once the junction is clear
- Conditions: decide from what the other device is doing
Levels
- Take turns: let one road go, and open the other gate once the junction is clear
- Two traffic lights: follow the light rules on both gates
- Busy junction: more cars, faster, and they give up sooner. Not a single crash