Uno (card game)
|This page uses content from Wikipedia. The original article was at Uno (card game). The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance)|
Your task here is to replicate or recreate the American Card Game: Uno, using ASCII art or using GUIs, it's up to you. This is for Uno's 50 year anniversary.
- You must have 4 players, 3 of which's cards will not be shown, those 3 are bots, the 4th one is the player, those cards are visible
- You must also have the pile to pick out cards
- You must include the Official Rules
- You must include the Penalties
The aim of the game is to be the first player to score 500 points, achieved (usually over several rounds of play) by being the first to play all of one's own cards and scoring points for the cards still held by the other players.
The deck consists of 108 cards: four each of "Wild" and "Wild Draw Four", and 25 each of four colors (red, yellow, green, blue). Each color consists of one zero, two each of 1 through 9, and two each of "Skip", "Draw Two", and "Reverse". These last three types are known as "action cards".
To start a hand, seven cards are dealt to each player, and the top card of the remaining deck is flipped over and set aside to begin the discard pile. The player to the dealer's left plays first unless the first card on the discard pile is an action or Wild card (see below). On a player's turn, they must do one of the following:
play one card matching the discard in color, number, or symbol play a Wild card, or a playable Wild Draw Four card (see restriction below) draw the top card from the deck, then play it if possible Cards are played by laying them face-up on top of the discard pile. Play proceeds clockwise around the table.
Action or Wild cards have the following effects:
|Card||Effect when played from hand||Effect as first discard|
|Skip||Next player in sequence misses a turn||Player to dealer's left misses a turn|
|Reverse||Order of play switches directions (clockwise to counterclockwise, or vice versa)||Dealer plays first; play proceeds counterclockwise|
|Draw Two (+2)||Next player in sequence draws two cards and misses a turn||Player to dealer's left draws two cards and misses a turn|
|Wild||Player declares the next color to be matched (may be used on any turn even if the player has matching color; current color may be chosen as the next to be matched)||Player to dealer's left declares the first color to be matched and plays a card in it|
|Wild Draw Four/Draw Four Wild (+4 and wild)||Player declares the next color to be matched; next player in sequence draws four cards and misses a turn. May be legally played only if the player has no cards of the current color (see Penalties).||Return card to the deck, shuffle, flip top card to start discard pile|