Comment Comment by rojoca This is what state machines/charts are for. They prevent you from entering invalid states, and take responsibility for all changes in state. parent rojoca 5 years ago