Reminds me of the lab I TA'ed college where we had to implement a track with 2 trains on it as a state machine and make it impossible for the two trains to collide. We had to eventually implement this state machine in vhdl which was then run on a fpga where we could simulate and control the trains:
http://engineering.armstrong.edu/tom/engr2031/engr2031traina...