An open API service indexing awesome lists of open source software.

https://github.com/andrej123456789/uno_pp

Simple game inspired by Uno with extra tweaks
https://github.com/andrej123456789/uno_pp

c game terminal

Last synced: 9 months ago
JSON representation

Simple game inspired by Uno with extra tweaks

Awesome Lists containing this project

README

          

# uno++
Simple game inspired by Uno with extra tweaks.

Written using C programming language and uses around 230 kilobytes of RAM.

**The name UNO is a registered trademark of its respective owner. All rights to the name, logo, and related branding are fully reserved and protected under applicable trademark laws.**

[v2.0.0](https://github.com/Andrej123456789/uno/releases/tag/v2.0.0)

[v3.0.0](https://github.com/Andrej123456789/uno/releases/tag/v3.0.0)

## Rules
[Uno rules]()

In short, this game uses official Uno rules with additional house rules.

Most notable differences are those that you don't have to say word `uno` when you have only one card left; and when +2 and +4 cards are played, next player is not skipped.

## Compile

### Installing dependencies

| Package: | Command: |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| git | DebianArch Linux`apt-get install git``pacman -S git` |
| make | DebianArch Linux`apt-get install make``pacman -S make` |
| gcc | DebianArch Linux`apt-get install gcc``pacman -S gcc` |
| json-c | DebianArch Linux`apt-get install libjson-c-dev``sudo pacman -S json-c` |

**Notice for Windows users! You only need to install CMake and Visual Studio with C/C++ development extension!**

### Compiling & running

| Number: | Step: | Command: |
| ------- | ---------------------------- | ------------------------------------------------------------------ |
| 1 | Clone a repository | `git clone https://github.com/Andrej123456789/uno_pp` |
| 2 | Enter the `src` directory | `cd uno_pp/src` |
| 3 | Compile | `make` |
| 4 | Run the program | `make run` |
| 5 | Enter the `client` directory | `cd ../client` |
| 6 | Compile and run the client | `gcc client_posix.c -o client_posix && ./client_posix ` |

**Notice for Windows users! Install x64 static version of `json-c` from vcpkg and run CMake with the following argument: `-DVCPKG_ROOT="path_to_vcpkg"`.**

**Notice for Windows users! Enter `Developer Command Prompt` and run the following command to compile and run the client: `cl client_windows.c && ./client_windows `.**

## Default settings
default.json:
```json
{
"match_points": 250, // number of points required to win a match
"points_path": "settings/points.json", // path to the JSON file storing points
"players": 2, // number of players in the game [2, INT32_MAX>
"tweaks": [{
"colors": true, // are colors enabled
"stacking": true, // is stacking allowed
"swap_card": true, // is swap card present
"seven_o": false // is SevenO house rule enabled
}],
"network": [{
"enabled": true, // is multiplayer enabled
"port": 5555 // port number
}]
}
```

points.json:
```json
// reset manually after finishing a match
// otherwise, don't change these values manually
{ "Player 0": 0, "Player 1": 0 }
```

## External dependencies
- [c-vector](https://github.com/eteran/c-vector)