state machine

Also known as: state machines

A state machine models a system as a set of states and the events or rules that move it from one state to another.