If there's one type of game that students that take my courses seem to love, and those are card games,
so this idea for the game came to me from a really simple card game where you divide a deck of cards,
each player gets a certain stack of the cards, dealt a certain stock of the cards.
And then really the objective is you simply turn over the top card.
Whoever has the highest card wins, wins the pot and you try to get all the cards.
So if you run out of cards, you lose.
If you get all the cards, you win.
So this is JavaScript game and it's also very visual.
So I've added in the visual cards as well so that we can have a really nice, presentable game for people
to play it.
And there's also some dynamic stuff here where you can select the number of players.
It will automatically deal the cards to each one of the players.
And also, if you have played this kind of card game before, you know, it kind of gets quite lengthy
and quite long and boring.
So I've also added in because, of course, where JavaScript programmers and we can add in some functionality
that we want to add and make things a lot quicker so we can play hundreds of rounds instantly with this
game.
And it's going to run through all of the code instantly showing you everything.
And that's an added feature that I've added into this game to make it more functional and to, quite
honestly, to prevent boredom.
So let let me show you.
So you come in and you can select any number of players you want.
In this case, I'm going to select four players.
So we see that each one of the players gets the cards, dealt with them.
And seems like player four has the high card here so that each player started with thirteen cards because
that's the deck of cards is 52.
So each one got dealt thirteen and player four had the high card.
So he won or she won all of the other cards.
So that's been added in.
And now we can attack as many times as we want and we can update the amount of rounds that we play through
as well.
And you can see the scoring of all of the cards is down there below.
So if you want it to run like five hundred rounds or something like that, you can see which players
have lost, which players have won.
And there's also a functionality in here if they're drawing the same card that we draw the next card
until one player either runs out of cards or the other player matches and beats the card of the existing
player, and then that's the one that's the winner.
So the winner isn't green.
Let's do five hundred more rounds and we see that player four is still hanging on here.
So this is a thousand over a thousand rounds we've played.
It also tracks down who won.
All of the stats is being written out here.
So you can see each round that gets played, it gets added into the scoring there.
So a lot of really cool functionality in this game.
And I do suggest that you try it out and have some fun with it, enjoy it and see what you can do and
see what tweaks and updates you can make to this game.
Thanks again for taking the section.