I\'m actually implementing a state machine in Kotlin based on D3xter\'s answer
I declared the state machine in an activity, here is the beginning:
priv