- Simple and intuitive controls,
- Public gamerooms,
- Modern user interface,
- Free and open-source.
- Fully typed code (PEP-484),
- Testable, clean layered architecture,
- 100% tests coverage,
- Most public interfaces documented with Google style docstrings.
Tuicub is available as tuicub
on PyPI:
pip install tuicub
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)
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
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
Tuicub is inspired by the popular tile-based game Rummikub®. Most of the game rules of Rummikub® apply also to tuicub.
- tom-bartk/tuicub-server - the server for tuicub,
- tom-bartk/tuicub-website - the tuicub's website.
- tom-bartk/pydepot - strongly-typed, scalable state container for Python,
- tom-bartk/pyllot - application routing with event-driven finite-state machine,
- tom-bartk/httperactor - async interactor for HTTP requests using a template method.
- tom-bartk/eventoolkit - client-side toolkit for abstract events.
- tom-bartk/asockit - client-side toolkit for async sockets.
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/.