I wrote the first version of this game before Python had the Enum class. Here I show how I improved the code to use this one:
class Item(Enum):
ROCK = 0
PAPER = 1
SCISSORS = 2
https://github.com/dcbriccetti/python...
Oops. The comment for the beats function,
'Return the item this item beats'
is out of date. It should say,
'Return whether this item beats the given item'.
On this page of the site you can watch the video online Python Enum: Refactoring Rock, Paper, Scissors Game with a duration of hours minute second in good quality, which was uploaded by the user Dave Briccetti 19 January 2022, share the link with friends and acquaintances, this video has already been watched 169 times on youtube and it was liked by 2 viewers. Enjoy your viewing!