Make and use an instance variable so when you flip the lever the variable toggles on and off, then use that to decide if the door is open or not.
If Lever A is flipped -> Toggle Lever A Instance Variable 0/1
If Lever A Instance Variable = 0 -> Close Door A
Else -> Open Door A
Repeat the steps for Lever B etc...