RGB Networks interview question

how statemachine works