     # Start
     @_setState states[0].state if states[0]
 
+  # Get surrent state
+  getState: -> @_state ? null
+
   # Override trigger to run machine events
   trigger: (event, args...) ->
     if handler = this[event]?

# State Machine
class StateMachine extends Events
  # -- Private --
  _getState: -> @_state ? null
  _setState: (next) ->
    unless next?
      return @_throw "Invalid state '#{ next }'"

    current = @_getState()
    @_state = next+''
    @trigger 'state:change', current, next



  _triggerEvent: (event) ->
    # Get current state and find out if event allowed
    current = @getState()
    next = @_blueprint[current]?[event]

    # Set next state
