it was supposed on c++, but i said i am terrible programming...
but i dont need to test the Floor am in because that its the job of the counter Floor, as you can see it increments or decrements depending on haw many floors the elvator moves.... but the main problem its to implement a routine, that when the elevator its on move, untill this routine finish the elevator wont change the direction when a buttom pin changes its state...