Train Shunting
Cars wait in a line at the entry. Send the front car, one at a time, to the exit or into a siding. A siding is a dead end, so the car that went in last comes out first. Line the cars up at the exit in the target order.
Tap the track a car is on, then tap where it should go.
How to play
To move a car, tap the track it is on (the entry or a siding), then tap where it should go. Only the leftmost car on each track can move. Cars leave the entry from the left end. A siding is a dead end that you enter and leave from its left side, so the last car in is the first out. The exit fills from the left in the order you send cars. Match the “Target” row to finish. If you send the wrong car to the exit, the puzzle can no longer be completed.
Learn more
These 15 levels were made by this site’s own generator. The fewest moves are found by breadth-first search over where every car is, across the entry, the sidings and the exit, and checked for every level in the tests. “Last in, first out” is called a stack in computing, and with only one siding some orders simply cannot be built.