Text-based game of the famous card game UNO built in Python!
Built by Alden DeMello and Sebastian Deluca!
The game is played between you and the computer. You and the computer both start with seven cards, and they are dealt to each individual hand. The rest of the cards are placed in a Draw Pile. A random card must be drawn from the Draw Pile and then the game can begin!
IF PYTHON 3.4.4 IS ALREADY INSTALLED, SKIP TO STEP # 3
1. Open your internet browser (Internet Explorer, Chrome..)
2. Download Python 3.4.4
(https://www.python.org/downloads/release/python-344/)
3. Once installed, launch Python IDLE.
4. Go to File... Open... search for DeMello_Deluca_CA.py
5. Click on Run followed by Run Module (or hit F5) and the game will begin.
The user begins playing by default. Every player views their cards and tries to match the card in the Discard Pile. You have to match either by the number, color, or the symbol/Action. For instance, if the Discard Pile has a red card that is an 8 you have to place either a red card or a card with an 8 on it. You can also play a Wild card (which can alter current color in play). If you or the computer has no matches or they choose not to play any of their cards even though they might have a match, they must draw a card from the Draw pile. If that card can be played, play it. Otherwise, the game moves on to the next person in turn. You can also play a Wild card, or a Wild Draw Four card on your turn.
Regardless of what card the game starts off on, (ie. Plus 4, Plus 2) the player starts first and does not have to pick up any cards. In the case of a plus 4 starting off the game, the player is able to place any card in their hand.
Our version of UNO’s cards have the same functions are the physical card game, however, they are displayed differently. All cards are displayed as ‘X#’, X meaning colour, and # meaning number. So, for example, a Red 5 will display as R5 in our game.
If you or the computer plays a reverse card the turn returns back to the one playing the reverse card. It can only be played on a card that matches by color, or on another Reverse card. If turned up at the beginning of play, nothing happens and the game will continue and the user will start. This card is displayed as ‘Xr’, ‘X’ meaning colour, ‘r’ meaning reverse.
When a player places this card, their opponent has to skip their turn. It can only be played on a card that matches by color, or on another Skip card. This card is displayed as ‘Xb’, ‘X’ meaning colour, ‘b’ meaning block. For example a Red Skip will display as ‘Rb’ in our game.
When a player places this card, the next player will have to pick up two cards and forfeit their turn. It can only be played on a card that matches by color, or on another Draw Two. If turned up at the beginning of play, the game continues without anyone picking up cards and the user still begins by default. This card is displayed as ‘Xp’, ‘X’ meaning colour, ‘p’ meaning Plus. So, for example, a Yellow Draw Two will display as ‘Yp’ in our game.
This card represents all four colors, and can be placed on any card. The player has to state which color it will represent for the next player. It can be played regardless of whether another card is available. This card is displayed as ‘Cx’, followed by a choice of 4 options ‘Rz’ ‘Gz’ ‘Yz’ ‘Bz’, each representing the colour, ‘z’ has no meaning but informs the player of the colour changed so it does not disrupt gameplay.
Similar to the Wild Card, but the player it is played against has to pick up four cards. It is displayed as ‘P+’, which just symbolizes Plus Four. Once played, the opposing player will pick up four cards, and the player who played it gets to change the colour of the game. (Refer to ‘Wild Card’ for explanation of colour changing.)