UNO (2-Player Console Game)
A console-based UNO game for 2 players, developed by me and my team mate Hanzala Ahsan. This the classic card game UNO works on Windows terminal, complete with colored cards, special card actions, and a persistent scoreboard.
- Classic UNO gameplay for two players.
- Colored cards using Windows console text colors.
- Special Cards: Skip, Reverse, Draw 2, Wild, Wild Draw 4.
- Persistent scoreboard (saved to
scoreboard.txt). - Clear instructions and easy menu navigation.
- Replay support: Play multiple games in a session.
- Windows OS (uses Windows headers and
system("CLS")/console colors) - C++ compiler (e.g., MSVC, MinGW, Code::Blocks, or Dev C++)
-
Save the source code to
main.cpp. -
Open Command Prompt or your preferred IDE.
-
Compile:
g++ main.cpp -o uno.exe
-
Run:
uno.exe
-
Launch the game to see the main menu:
- Play UNO
- View Scoreboard
- Exit
-
Choose "Play UNO" to start a new game.
-
Each player gets 7 cards. The rest form the deck.
-
Turns alternate between Player 1 and Player 2.
-
Play a card that matches color or number, or play a Wild card.
-
Draw a card if unable to play.
-
Call UNO ("u") when you are down to two cards.
-
First player with no cards wins!
C- Throw a card (then enter card number)D- Draw a card from deckU- Call UNO (when down to two cards)S- View scoreboardE- Exit game (with confirmation)
- After each game, results are saved to
scoreboard.txt. - Shows game number, winner, points, and cumulative scores.
- Standard C++ libraries:
<iostream>,<iomanip>,<ctime>,<fstream>,<cstdlib>,<conio.h> - Windows-only:
<windows.h>(for colored output), usessystem("CLS")to clear screen.
-
Exit Option at Any Time:
Add the ability to exit gracefully from any prompt or turn, not just from the main menu. -
General Improvements:
- Input validation and error-proofing for all user inputs.
- Cross-platform support (remove Windows dependencies, use ANSI colors).
- Improved card visualization.
- Add bot/AI for solo play.
Feel free to contribute or fork this project!
- Ermish Tabassum
- Hanzala Ahsan
This project is provided for educational purposes. No commercial rights claimed.
UNO is a trademark of Mattel Inc. This project is a fan implementation and not affiliated with or endorsed by Mattel.