It's built in a modular way. The "world" (renderer, building state, lift behavior) is separate from the "controller" code, which determines which lift is sent to which floor when someone presses a button.
See it in action at http://simlift.meidosem.com/.
— Mai