Thanks for sharing. You might be interested in this nice implementation of the same game implemented by the Go team a few years ago. It contains a great demonstration of hoe to solve this problem elegantly using functions as returned values: https://golang.org/doc%2Fcodewalk%2Fpig.go
Cheers, Pablo On Monday, October 16, 2017 at 8:37:20 AM UTC+11, bnix...@gmail.com wrote: > > Here's an implementation of the "pig" dice game that I wrote in go to > learn the language. Nothing exciting, but I thought others who are just > starting might be interested. > > https://github.com/bnixon67/gopig > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.