Skip to main content

Online multiplayer board game in your terminal.

Project description

Logo

tuicub - online multiplayer board game in your terminal.

Website · Server

Screenshots

Gameplay

Screenshot showing gameplay

Public gamerooms

Screenshot showing starting screen

Gameroom

Screenshot showing starting screen

Gameplay

Screenshot showing starting screen

Features

Application

  • Simple and intuitive controls,
  • Public gamerooms,
  • Modern user interface,
  • Free and open-source.

Code

  • Fully typed code (PEP-484),
  • Testable, clean layered architecture,
  • 100% tests coverage,
  • Most public interfaces documented with Google style docstrings.

Installation

Using pip

Tuicub is available as tuicub on PyPI:

pip install tuicub

Manually

Start by cloning the repository:

git clone https://github.com/tom-bartk/tuicub.git
cd tuicub

Then, install the project's dependencies:

python -m pip install -e .

You can now launch the game by running:

$ python -m src.tuicub --help

Usage: src.tuicub [-h] [-d] [-u URL] [--events-host HOST] [--events-port PORT] [--logfile PATH] [--theme PATH]

An online multiplayer board game in your terminal.

options:
  -h, --help            show this help message and exit
  -d, --debug           Enable debug mode. (default: False)
  -u URL, --api-url URL
                        Base URL for the API. (default: https://api.tuicub.com)
  --events-host HOST    Hostname of the events server. (default: api.tuicub.com)
  --events-port PORT    Port of the events server. (default: 23432)
  --logfile PATH        If debug is enabled, write logs to file at this path. (default: /tmp/tuicub.log)
  --theme PATH          Path to the file containing the custom color theme. (default: None)

Configuration

Color theme

Tuicub uses a modified gruvbox color theme. A custom color theme can be configured using a toml file with the following structure and default values:

fg_black = "#191b1c"
fg0 = "#fbf1c7"
fg1 = "#ebdbb2"
fg2 = "#d5c4a1"
fg3 = "#bdae93"
fg4 = "#a89984"
fg5 = "#857a6b"
bg0 = "#191b1c"
bg1 = "#1d2021"
bg2 = "#232425"
bg3 = "#282828"
bg4 = "#2d2c2c"
bg5 = "#32302f"
bg6 = "#3c3836"
bg7 = "#504945"
bg8 = "#665c54"
gray = "#928374"
aqua = "#8ec07c"
aqua_dim = "#343d34"
purple = "#d3869b"
purple_dim = "#413339"
red = "#fb4934"
red_dark = "#cc241d"
red_dim = "#462726"
blue = "#83a598"
blue_dim = "#304142"
yellow = "#fabd2f"
yellow_light = "#fac74d"
yellow_dark = "#d79921"
yellow_dim = "#67552a"
green = "#b8bb26"
green_light = "#c5c646"
green_dark = "#98971a"
green_dim = "#454528"
orange = "#fe8109"
orange_dark = "#d65d0e"
tile_fg_selected = "#fbf1c7"
tile_bg_light = "#ede6cd"
tile_bg = "#ddd1ba"
tile_blue = "#00abc8"
tile_yellow = "#f39300"
tile_red = "#d6070f"
tile_black = "#0c0a05"
tile_black_selected = "#747474"
tile_selected_border = "#504945"

You can change only some of the colors - omitted colors will fall back to default values.

To use a custom theme, set the --theme option to the path of your theme file when running the game:

tuicub --theme ~/mytuicub/theme.toml

Running

Usage: tuicub [-h] [-d] [-u URL] [--events-host HOST] [--events-port PORT] [--logfile PATH] [--theme PATH]

An online multiplayer board game in your terminal.

options:
  -h, --help            show this help message and exit
  -d, --debug           Enable debug mode. (default: False)
  -u URL, --api-url URL
                        Base URL for the API. (default: https://api.tuicub.com)
  --events-host HOST    Hostname of the events server. (default: api.tuicub.com)
  --events-port PORT    Port of the events server. (default: 23432)
  --logfile PATH        If debug is enabled, write logs to file at this path. (default: /tmp/tuicub.log)
  --theme PATH          Path to the file containing the custom color theme. (default: None)

Following example starts the game with a custom API and events server:

tuicub --api-url http://localhost:8080 --events-host localhost

Rules

Tuicub is inspired by the popular tile-based game Rummikub®. Most of the game rules of Rummikub® apply also to tuicub.

Rules of Rummikub®.

See also

Packages used in tuicub

License

AGPLv3

Copyright (C) 2023 tombartk 

This program is free software: you can redistribute it and/or modify it under the terms
of the GNU Affero General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.
If not, see https://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tuicub-0.1.3.tar.gz (134.8 kB view details)

Uploaded Source

Built Distribution

tuicub-0.1.3-py3-none-any.whl (158.9 kB view details)

Uploaded Python 3

File details

Details for the file tuicub-0.1.3.tar.gz.

File metadata

  • Download URL: tuicub-0.1.3.tar.gz
  • Upload date:
  • Size: 134.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for tuicub-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ab93ee6c91206a8ba6fa4b07b772d8c8e2a0508a0d9b0605f2d4446835beaadf
MD5 3693f1fab6927dd42a9299f6929f7bd4
BLAKE2b-256 6498b336cb964a67aefa76fd1d3a549ac1107dd57d54aa17511ab0e676c01781

See more details on using hashes here.

File details

Details for the file tuicub-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tuicub-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 158.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for tuicub-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 71cfcb48c28585db6a2fe3fedd7659aa66706841cba32024abeced2e01dcc544
MD5 88d434067f1efc4a2a0661d698a31299
BLAKE2b-256 ddaf1fb0a6e4115df0acdde1ad0025d106b7769940f94c4d5ad2cc716ab9297e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page