Stylized logo of the project on the terminal.
Welcome to the SUno project, a terminal-based implementation of the UNO card game, written in C and following the C99 standard.
This project was developed as a way to study and practice the C language, focusing on modularization, coding best practices, code structure, and game logic. The goal was to create a challenging, fun, and faithful experience based on the official UNO rules.
The game is fully functional and can be downloaded from the RELEASES section. Check it out at the link below:
Download the appropriate version for your operating system. After that, extract the compressed file to the location you want on your computer. Then, simply run the executable file.
SUno is a fully terminal-based UNO game, providing a smooth and immersive gameplay experience with support for solo mode against AI opponents.
- Intuitive text-based game interface.
- Full implementation of the official UNO rules.
- AI system for bots, each with slightly different strategies.
- Detailed messages to track moves and actions.
- Support for multiple players against AI opponents.
- Well-structured and modular code following best practices.
- Uses only C standard libraries.
The code structure has been carefully designed to be easy to understand, modify, and expand, allowing for future feature additions.
UNO is an American card game created by Merle Robbins and family in 1971. Over the years, it has become one of the most popular card games worldwide, with various themed editions and rule variations.
- Number of players: 2 β 10
- Number of cards: 108
- Average playtime: 15 β 30 minutes
-
The objective of the game is to be the first player to get rid of all their cards.
-
Each player starts with 7 cards, and a card from the top of the deck is flipped to start the discard pile. During the game, players must play a card that matches the top card of the discard pile by number, color, or type. If they cannot play, they must draw a card.
-
The deck includes number cards (0β9) and special action cards, as shown in the table below:
Card | Effect |
---|---|
Skip | The next player loses their turn. |
Reverse | Reverses the turn order. |
Draw Two (+2) | The next player draws 2 cards and loses their turn. |
Wild | Allows the player to choose a new color. |
Wild Draw Four (+4) | Allows the player to choose a new color, forces the next player to draw 4 cards, and lose their turn. |
-
If a player has only one card left, they must declare "UNO!". If caught not saying it, they must draw 2 penalty cards. The game continues until one player has no cards left.
-
When a player draws a card, his turn is passed.
A complete deck of UNO cards.
Player list displayed after game starts.
Player HUD.
Bots playing the game.
Contributions are welcome! If you want to fix bugs, optimize the code, or add new features, follow these steps:
-
Fork the repository.
-
Create a new branch for your changes:
git checkout -b my-modification
-
Make your changes and commit with a descriptive message:
git commit -m "feat: improved AI logic."
-
Push your changes to your repository:
git push origin my-modification
-
Open a Pull Request (PR) so your changes can be reviewed.
If you find a bug or have a suggestion, feel free to open an issue! π
To compile SUno, you need a C compiler that supports C99. The code can be easily compiled using GCC.
git clone https://github.com/Starciad/SUno.git
cd SUno
Make sure you have GCC and make installed in your environment. Then, navigate to the project/
directory and run make
. The game will compile and generate an executable.
./SUno
If you prefer to compile manually, ensure that all *.c
files are being compiled correctly and that the headers in include/
are included.
This project is licensed under the MIT License.
This means you are free to use, modify, and distribute the code, as long as proper credit is given to the original author.
For more details, check the LICENSE
file.
π΄ β₯ Thank you for checking out this project. Have fun playing UNO in the terminal! π