Last active
October 10, 2020 17:48
-
-
Save satriahrh/2a41da028a8727fbe53b1af125ffb6b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
for event := range []string{"coin", "coin", "push", "touch"} { | |
err := fsm.Transition(event) | |
if err != nil { | |
fmt.Println(err) | |
} | |
fmt.Println(fsm.Current()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment