Rush Hour

Run a traffic gate with blocks. Open it for each car, close it once the car is through, then add traffic lights and a car counter.

Easy – Medium3 levels1 device
Play this mission

No hardware, no sign-up: press Play and every mission runs on 3D simulated devices.

A car is coming up to the gate! When it presses the button, your program has to open the gate, wait for the car to pass, and close it again. Never close it on a car.

What you'll learn

  • Events: run blocks when a button is pressed
  • Sequences: green light → open → close → yellow → red
  • Delays: wait for the car before closing
  • Counters: count every car that gets through

Levels

  1. Let them through: open the gate when a car arrives, close it once the car is through
  2. Traffic lights: green before you open; after closing, yellow for a second, then red
  3. Count them: the same light rules with faster cars, and count every car

More missions

Crossroads

Run two gates at a crossing from one program. Let one road go at a time, with no crashes.

  1. Take turns
  2. Two traffic lights
  3. Busy junction
Medium – Hard3 levels2 devices
Play this mission