A Java implementation of the classic UNO card game with interactive terminal gameplay.
- 🎮 Interactive terminal-based gameplay
- 🤖 Play against computer opponents (bots)
- 🃏 Full UNO card set with all special cards
- 🎨 Color-coded cards with emojis for better visualization
- ⚡ Smart CPU opponents with strategic card play
The game follows standard UNO rules:
- Each player starts with 7 cards
- Match color or number with the top card
- Special cards: +2, Skip, Reverse, Wild, Wild +4
- Say "UNO" when you have 1 card left
- First player to empty their hand wins!
- Java 8 or higher installed on your system
-
Build the game:
./build.sh
-
Run the game:
./run.sh
- When prompted, enter the number of computer players you want to play against
- Enter your name
- When choosing amount of bots, try to choose between 1-4 players otherwise gameplay will error when there are not enough cards to distirbute in the beginning
- The game will display your cards and the current card in play
- Type the exact name of the card you want to play (e.g., "Red 5", "Blue Skip", "Wild Red")
- Type "Draw" to draw a card if you can't play
- Type "Uno" when you have 2 cards left to declare UNO
- Press Enter to continue between turns
- Normal Cards: Red, Green, Blue, Yellow (0-9)
- +2 Cards: Force next player to draw 2 cards
- Skip Cards: Skip the next player's turn
- Reverse Cards: Reverse the direction of play
- Wild Cards: Change the color to any color
- Wild +4 Cards: Change color and force next player to draw 4 cards
Enjoy playing UNO! 🎉
- Object-Oriented Programming: Created classes for
Card,Deck,Player, andGame - Collections Framework: Used
ArrayListfor managing cards and players - Exception Handling: Implemented try-catch blocks for user input validation
- Scanner Class: Used for reading user input from the terminal
- HashMap: Created color-to-emoji mappings for better card visualization