Colorful cars flow through a four-way intersection controlled by a traffic-light state machine that cycles between north-south green, east-west green, and brief all-red clearance phases. Each car checks the light for its direction and either keeps moving at its set speed or slows to a stop at the line if its approach is red, so traffic queues and releases in waves without collisions.