Here I will talk more about my own network based Uno game (coded in Python & using Flask).
Unlike my poker game, im sure you all know how Uno works and what it is 😅 So first of all, there are of course very many different variants of Uno. Probably everyone will play with different rules. In my version of uno you CAN lay +4 cards on +2 cards, and you can lay +4 cards anytime, not just when it is your only legal card or something. Also if your drawn card is legal, you can lay it down. You only draw once if you can't lay any card, or for some reason if you want to draw but you can lay at least one card, you can also do that. After drawing once you can't anymore (except when you need to, because of +2 or +4 cards), and after finishing drawing you can lay 1 more card, if it is legal. I will spare you with the rest of the boring details!
So let's finally get to the code! As always I started to define some cards
The most interesting thing in my opinion was the netcoding. I defined function like draw_card() or play_card(), as arguments I had the front-end pass in the Player's ID from the URL, and for example in the play_card() function it also passed along which card the User pressed on. Using this I could verify if the laid card was legal (which by the way also got shown in the front-end already using red and green stripes), and then I changed who's turn it was. In the GUI on the website you could also see who's turn it was and how many cards each user has left.
If you had for example 20 Players you could of course also adapt the size of the deck, and also how many wild cards there are, to make the game more interesting :) Speaking of interesting, if you would change your URL mid-round you could actually lay cards for your opponents 😅 I didn't build any protection into this, but after all, for a small project like this it doesn't matter.
I want to improve the GUI a little bit including the "change color" dropdown, because right now it is very confusing to choose a color when laying wild cards. Also I want to build in a dark-theme but that will be quite hard to do... Right now I have other focuses than improving this project. But some day I'm sure I will do it, also I should a way for users to say "UNO" when they lay their last card. Although im not sure yet if I really want to include it. Unlike my poker project I won't set any goals on when I want to finish this 😅 The chances of me finishing in time are near to None, so let's just keep the time frame unset :)
Edit:
For the first time I actually didn't take 5 months to even look at the project again 😅 I fixed the "Choose a color" menu :)