+ class AbstractNonStartState(State):
+ def handle_pins_event(self):
+ if self.pins().door_locked != (not self.pins().space_active):
+ self.actor().act(Actor.CMD_RED_ON)
+ else:
+ self.actor().act(Actor.CMD_RED_OFF)
+ return super().handle_pins_event()
+
+ class AbstractLockedState(AbstractNonStartState):