First you make a state table or state diagram (Google "state transition table" if you need to) of every state the elevator can have (at a particular floor, going to a particular floor, selection of a floor with a push-button, open door, close door, etc.). Then you generate the boolean logic to perform the state machine functions and to go from one state to the next. Finally, incorporate the logic using discrete IC logic gates or perhaps a programmable logic array.