INTRODUCTION
The Programming Challenge
In this challenge, students are asked to create a simulator that support a Game of UNO played between 2 to 10 bots according to published basic rules for UNO. The simulator must also allow the creation of game play bots that use different strategies. The simulator must be capable of playing multiple games to determine the bot with the best game strategy. Finalists will be asked to submit the code for their winning bots to determine the classroom best bot of the competition.
Description of the Game UNO
UNO is a popular group game for groupa numbering between 2 to 10. In this game, the players are dealt cards and then take turns attempting to discard cards in their hands by various rules. The round is completed when one of the players had discarded all of his cards. On this, this round ends and the points are counted by the remaining cards on the hands. When played manually a game would last over 20 min. The rules of the game UNO are spelled out in detail in the instruction card that is supplied with each deck of game cards. UNO is a very popular game that encourage the emergence of “house rules” that change the nature of play. However, for this example, we will use a basic set of rules.
Playing cards
There are 108 cards in a desk of UNO cards:
- 76 numbered cards: Each digit (0 to 9) is represented in 4 colours. Each card is assessed its face value. There is only one of each zero value card but the other values are printed in double quantity.
24 action cards: There are 3 actions: Skip, Reverse and Take 2. Each action card is represented in 4 colours and printed in double quantity. Each card is accessed 20 points.
8 Black active UNO cards: There are 4 cards each for each action: “Choose the colour”, and “Choose the colour and take four”. The cost of each card is 50 points.
Active UNO cards
Skip - the next player misses his turn. The player can “save himself” from the action of this card only by laying out exactly the same card (the same colour, the same picture) as an Intervention.
Take two - the next player takes two cards from the “Widdie” deck and skips his turn. The player can “save” from the action of this card by laying any “Take Two” from his hand. (The card can be any colour). The actions of the “Take Two” cards are not accumulated, and the last player after a “chain” of “Take Two” cards, takes only two cards from the “Widdie” deck and skips his turn.
Reverse card - the direction of the turn is reversed. For example, it was “clockwise”, after laying out the uno reverse card it will be “counter-clockwise”. When laying out several cards “Reverse” their actions are summarized. For example, two cards “Reverse” have no effect - the turn continues in the same direction as before, three cards “Reverse” change the direction of the turn to the opposite, etc.
Choose Colour - allows you to change the player’s current colour (for any colour, including the current colour). The next player must put any card of the specified colour. In order to lay out the card “Choose Colour” the player does not need any special conditions, unlike the next card “Choose Colour and take four”
Choose Colour and take four - can only be laid out by the player in his turn and only if the player lacks the current colour. (Having the current number, active cards or black active cards does not prevent this card from being played. The player will need to choose the next colour which can be any colour including the current color. The next player must take four cards from the top of “Widdie” deck and skips his turn, except if that player can lay out from his hand a “Take Two” card of the new ordered colour (whereapon the subsequent player after that will need to play according to the standard rules of a “Take Two” card.
Rules of play
At the beginning of the game, each player is dealt by 7 cards face down. The remaining cards are put face down in a stack called a “Widdie”. The top card from the deck “Widdie” is turned over, put next to and becomes the first card of the “Discard” deck.
The game starts “clockwise”. The first player is after the dealer (the dealer changes each round, usually clockwise).
During his turn, the player has the right to lay one card on the “Discard” deck according to one of the following rules:
The card should be the same colour.
the card must have the same digit, or the same picture (be active)
the card is a black active card.
In the absence of a suitable card, the player takes the top card from the “Widdie” deck. If the card meets the above conditions - the player can put the card on the “Discard” deck. If the new card does not satisfied any of these rules, the player puts the card in his hand, says “Pass” and the turn goes to the next player.
The game continues until one of the players discards all the cards. After that, the points by the remaining cards are counted (the value of the cards is shown in the section Types of cards, the winners are determined according to the results of several rounds - clause Win).
Announcing “UNO!”
The player must shout “UNO!” to warn when a play has left him with only one card in his hand and he might finish the game soon. “UNO!” must be declared before the nexgt player takes his turn. For forgetfulness, a player who did not say “Uno!” on time takes two cards (blindly) from the top of the “Widdie” deck.
Note. Players do not have the right to hide the number of cards in their hand.
Counting points
There are 2 ways to count points to determine the winner.
The player, who first discards his cards, is charged the amount of points left on the hands of all other players. And so in every round. The winner is the one who, according to the results of several rounds, will score 500 points. This option encourages players to be the first to discard all the cards in their hands.
Players are recorded points counted by the remaining cards on their hands (player who first throw off their cards gets zero points). And so on in every round. The loser is one who, according to the results of several rounds, will score 200 points, the remaining are winners. This option encourages player to quickly discard the most “expensive” cards.
Fines
With a large number of errors and inattention, an additional rule can be introduced - for any erroneously laid out card, false shout, etc. the player takes two cards from the top of the “Widdie” deck.
If the “Choose Colour and take four” card has been played and it is suspected that the card was used dishonestly, the player who used the card can be directed to his hand to the accuser. If dishonesty has been discovered, the play must put the “Choose color and take four” card back into his hand and must take 4 cards from the top of the “Widdie” desk and skips the turn. But if the card was used correctly, the accuser must do as the black action card says and take four cards from the top of the “Widdie” deck, as well as two more cards for mistrust and skips the turn.
METHODOLOGY
Object-Oriented Design
This project was developed around basic classes of objects that were defined to describe key players, events, attributes and methods that would be needed to simulate a Game of UNO.
RESULTS
DISCUSSION
LS0tDQp0aXRsZTogIkNyZWF0aW5nIGFuIFVOTyBTaW11bGF0b3Igd2l0aGluIGFuIFJ1YnkgT09QIFByb2dyYW1taW5nIENsYXNzIg0KYXV0aG9yOg0KICAtICJOaXBhcG9ybiBFdWF0aHJvbmdjaGl0LCBQYXlhcCBVbml2ZXJzaXR5IiANCiAgLSAiUm9iZXJ0IEJhdHppbmdlciwgUGF5YXAgVW5pdmVyc2l0eSINCmRhdGU6ICIyNiBKdW5lIDIwMTkgKGRyYWZ0KSINCm91dHB1dDogaHRtbF9ub3RlYm9vaw0KLS0tDQoNCiMgSU5UUk9EVUNUSU9ODQoNCiMjIFRoZSBQcm9ncmFtbWluZyBDaGFsbGVuZ2UNCg0KSW4gdGhpcyBjaGFsbGVuZ2UsIHN0dWRlbnRzIGFyZSBhc2tlZCB0byBjcmVhdGUgYSBzaW11bGF0b3IgdGhhdCBzdXBwb3J0IGEgR2FtZSBvZiBVTk8gcGxheWVkIGJldHdlZW4gMiB0byAxMCBib3RzIGFjY29yZGluZyB0byBwdWJsaXNoZWQgYmFzaWMgcnVsZXMgZm9yIFVOTy4gVGhlIHNpbXVsYXRvciBtdXN0IGFsc28gYWxsb3cgdGhlIGNyZWF0aW9uIG9mIGdhbWUgcGxheSBib3RzIHRoYXQgdXNlIGRpZmZlcmVudCBzdHJhdGVnaWVzLiBUaGUgc2ltdWxhdG9yIG11c3QgYmUgY2FwYWJsZSBvZiBwbGF5aW5nIG11bHRpcGxlIGdhbWVzIHRvIGRldGVybWluZSB0aGUgYm90IHdpdGggdGhlIGJlc3QgZ2FtZSBzdHJhdGVneS4gRmluYWxpc3RzIHdpbGwgYmUgYXNrZWQg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