Implementation of Finite-State Machine principles...