Applying the State Pattern in Kotlin