Skip to content

Instantly share code, notes, and snippets.

@nvinayshetty
Created April 6, 2019 04:00
Show Gist options
  • Save nvinayshetty/ac9d245f7a3b49f21ba093e4fc92daf5 to your computer and use it in GitHub Desktop.
Save nvinayshetty/ac9d245f7a3b49f21ba093e4fc92daf5 to your computer and use it in GitHub Desktop.
State Machine Data Structure
data class StateMachine(val states: Set<State>)
data class State(val name:String, val transitions:Set<Transition>)
data class Transition(val event:Event,val nextState:String)
data class Event(val eventName: String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment