In 2017 @giordano (with 2019 @Mason update) wrote about implementing Rock, Paper, Scissors.
Using v1.7 or v1.6, can we do this any better (more: elegantly, performantly, type-stable, gamelike)?
Are there new (or better understood) language elements or uses of the language that appertain?
[added for clarification]
I am a fan of the blog post and have used some of the code in examples over the years.
I am interested in showcasing at least some the same language features and wondering if there are amended approaches that in some manner would improve the implementations.
The main goal of this post is to show how multiple dispatch enables writing generic and extensible code in a few lines.
Rock, paper, and scissors would never be implemented that way if the goal was not to showcase language features. So what you are asking kinda seems to be missing the point, it never was about a good implementation.
I am a fan of the blog post and have used some of the code in examples over the years. I am interested in showcasing at least some the same language features β and wondering if there are alternative approaches to good implementations. [I added a note conveying this to my first post β thank you.]