|
Some checks failed
Build Desktop / Configure (push) Has been cancelled
Build Web / React (Node ${{matrix.node_version}}) (16) (push) Has been cancelled
Build Web / React (Node ${{matrix.node_version}}) (lts/*) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Debian, DEB, 12) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Debian, DEB, skip, 11) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Fedora, RPM, 41) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Fedora, RPM, skip, 40) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Ubuntu, DEB, 24.04) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Ubuntu, DEB, skip, 20.04) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Ubuntu, DEB, skip, 22.04) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (yes, Arch, skip) (push) Has been cancelled
Build Desktop / macOS ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (3, 1, macos-14, Apple, 14, Release, 14.3.1) (push) Has been cancelled
Build Desktop / macOS ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (3, macos-14, Apple, 14, Debug, 14.3.1) (push) Has been cancelled
Build Desktop / macOS ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (4, 1, macos-13, Intel, 13, Release, 14.3.1) (push) Has been cancelled
Build Desktop / Windows ${{matrix.target}} (msvc2019_64, 5.15.*, 7) (push) Has been cancelled
Build Desktop / Windows ${{matrix.target}} (msvc2019_64, qtimageformats qtmultimedia qtwebsockets, 6.5.*, 10) (push) Has been cancelled
* Refactor CardInfo Widgets to reside in their appropriate folder and to have a clearer naming structure. * Added Zach's work on storing printing information in the DeckList (#1) * Change CardInfo's PixmapCacheKey to be the UUID of the preferred set after database loading has finished. Otherwise, and if no UUID of a preferred set is available, default to the card name. * Refactor CardDatabase *db global variable to singleton CardDatabaseManager. This commit refactors the global variable CardDatabase *db into a singleton encapsulated by the DatabaseManager class, accessible via DatabaseManager::getInstance(). This change centralizes access to the database instance, improving code modularity and encapsulation, resolving dependencies on main.h for code that requires access to the database instance. - Added DatabaseManager class with getInstance() method returning a pointer to the singleton CardDatabase. - Removed global db variable and updated references across the codebase. - Thread-safe static initialization for the singleton. Impact: This refactor should have no functional impact on the application, as it maintains the same interface for accessing the CardDatabase instance. However, the codebase now benefits from improved encapsulation, lifetime management, and thread-safety. * fixed db issue an renamed sets to set in picture loader * canibalized zach work and added it to the decklist builder --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> * Reintroduce some changes lost in the merge. * Introduce UUID attribute to abstract_card_item, card_item, deck_view_card, server_card and serverinfo_card. * Have various game events respect the new UUID attribute on instantiation. * Correct some calls to default to preferred printing. * DeckList now tries to assign reasonable defaults for UUID and collectorNumber if none are found in loaded DeckLists. Rename overloaded DeckListModel findChild() function to findCardChildByNameAndUUID() for clarity. * canibalized zach work and added it to the decklist builder * Change getPreferredPrintingForCard to getPreferredSetForCard to reflect refactor. * Properly update and set the DeckEditor's CardFrame to fetch by name and UUID if a card was selected from the decklist. * Mainboard/Sideboard swaps should respect the UUID from the old zone instead of just blindly adding preferredPrinting. * If the card info is null, there's no point in trying to look for the sets. * Don't define methods twice. * Convenience method to fetch a specific CardInfoPerSet instance for a cardName and a UUID. * Check if the uuid starts with card_ when comparing. * Address pull request comments (nullptr checks and additional comments, mostly.) * Reformat code so the linter will stop yelling at me. * DeckList no longer pre-populates uuids. * Update Event_MoveCard to include the card UUID. * Update Player::MoveCard to include the card UUID. * Set the uuid when we set the cardName, in terms of hidden zones. * [TEST/RevertMe] Set the uuid everywhere to test. * Don't inline setUUID and mimic setName for AbstractCardItem. * Revert blindly setting uuid for testing. * Address PR comments (AbstractCardItem). * Combine if-statement. * Re-order uuid to visually align with its field number. * Remove unnecessary new uuid field from event_move_card. * Remove unused imports. * Include cardName in the PixmapCacheKey in order to not break double-faced cards. * Refactor setCode to cardUUID and introduce new cardSetShortName field. * Override * Refactor UUID to be providerId and change QString comparisons with empty string to isEmpty(). * Update translations. * Change parent to be the first argument. * Pull Parent argument up for CardItem. * Pull Parent argument up for CardItem. * Linter. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> Co-authored-by: LunaticCat <39006478+LunyaticCat@users.noreply.github.com> Co-authored-by: luna <yannbrun1507@outlook.fr> Co-authored-by: ZeldaZach <zahalpern+github@gmail.com> |
||
|---|---|---|
| .ci | ||
| .github | ||
| .husky | ||
| .tx | ||
| cmake | ||
| cockatrice | ||
| common | ||
| dbconverter | ||
| doc | ||
| oracle | ||
| servatrice | ||
| tests | ||
| vcpkg@bb1ca2757b | ||
| webclient | ||
| .clang-format | ||
| .cmake-format.json | ||
| .codacy.yml | ||
| .dockerignore | ||
| .gitignore | ||
| .gitmodules | ||
| CMakeLists.txt | ||
| docker-compose.yml | ||
| docker-compose.yml.windows | ||
| Dockerfile | ||
| format.sh | ||
| LICENSE | ||
| README.md | ||
| vcpkg.json | ||

Cockatrice | Download | Get Involved | Community | Translations | Build | Run | License
To get started, ⇢ view our webpage
To get support or suggest changes ⇢ file an issue (How?) To help with development, see how to get involved
Cockatrice
Cockatrice is an open-source, multiplatform program for playing tabletop card games over a network. The program's server design prevents users from manipulating the game for unfair advantage. The client also provides a single-player mode, which allows users to brew while offline. This project uses C++ and the Qt5 libraries.
Download 
Downloads are available for full releases and the current beta version in development. There is no strict release schedule for either of them.
-
- Stable versions are checkpoints featuring major feature and UI enhancements.
- Recommended for most users!
-
- Beta versions include the most recently added features and bugfixes, but can be unstable.
- To be a Cockatrice Beta Tester, use this version. Find more information here!
Get Involved 
Join our Discord community to connect with the project, contributors or fellow users of the app. Come here to talk about the application, features, or just to hang out.
For support regarding specific servers, please contact that server's admin or forum for support rather than asking here.
To contribute code to the project, please review the guidelines. We maintain two tags for contributors to find issues to work on:
- Good first issue: issues tagged in this way provide a simple way to get started. They don't require much experience to be worked on.
- Help wanted: This tag is used for issues that we are looking for a contributor to work on. Often this is for feature suggestions we are willing to accept, but don't have the time to work on ourselves.
For both tags, we're willing to provide help to contributors in showing them where and how they can make changes, as well as code review for changes they submit.
We try to be responsive to new issues. We'll provide advice on how best to implement a feature; alternately, we can show you where the codebase is doing something similar before you get too far along.
Cockatrice uses the Google Developer Documentation Style Guide to ensure consistent documentation. We encourage you to improve the documentation by suggesting edits based on this guide.
Community Resources
Translations 
Cockatrice uses Transifex for translations. You can help us bring Cockatrice, Oracle and Webatrice to your language or just adjust single wordings right from within your browser by visiting our Transifex project page.
Check out our Translator FAQ for more information about contributing!
Build

Detailed compiling instructions can be found on the Cockatrice wiki under Compiling Cockatrice
Dependencies: (for minimum requirements search our CMake file)
Oracle can optionally use zlib and xz to load compressed files:
To compile:
mkdir build
cd build
cmake ..
make
You can then run
make install
to get a cockatrice installation inside the release folder, or:
make package
to create a system-specific installation package.
The following flags can be passed to cmake:
-DWITH_SERVER=1Whether to build the server (default 0 = no).-DWITH_CLIENT=0Whether to build the client (default 1 = yes).-DWITH_ORACLE=0Whether to build oracle (default 1 = yes).-DCMAKE_BUILD_TYPE=DebugCompile in debug mode. Enables extra logging output, debug symbols, and much more verbose compiler warnings (defaultRelease).-DWARNING_AS_ERROR=0Whether to treat compilation warnings as errors in debug mode (default 1 = yes).-DUPDATE_TRANSLATIONS=1Configuremaketo update the translation .ts files for new strings in the source code. Note: Runningmake cleanwill remove the .ts files (default 0 = no).-DTEST=1Enable regression tests (default 0 = no). Note: needs googletest, will be downloaded on the fly if unavailable. To run tests:make test.-DFORCE_USE_QT5=1Skip looking for Qt6 before trying to find Qt5
Run
Cockatrice is the game client
Oracle fetches card data
Servatrice is the server
Servatrice Docker container
You can run an instance of Servatrice (the Cockatrice server) using Docker and the Cockatrice Dockerfile.
First, create an image from the Dockerfile
cd /path/to/Cockatrice-Repo/
docker build -t servatrice .
And then run it
docker run -i -p 4747:4747/tcp -t servatrice:latest
Note: Running this command exposes the TCP port 4747 of the docker container
to permit connections to the server.
Find more information on how to use Servatrice with Docker in our wiki.
Docker compose
There is also a docker-compose file available which will configure and run both a MySQL server and Servatrice. The docker-compose setup scripts can be found in the servatrice/docker folder and vary only slightly from the default sql and server .ini files. The setup scripts can either be modified in place, or docker-compose can mount alternative files into the images, as you prefer.
To run Servatrice via docker-compose, first install docker-compose following the install instructions. Once installed, run the following from the root of the repository:
docker-compose build # Build the Servatrice image using the same Dockerfile as above.
docker-compose up # Setup and run both the MySQL server and Servatrice.
Note: Similar to the above Docker setup, this will expose TCP ports 4747 and 4748.
Note: The first time running the docker-compose setup, the MySQL server will take a little time to run the initial setup scripts. Due to this, the Servatrice instance may fail the first few attempts to connect to the database. Servatrice is set to
restart: alwaysin the docker-compose.yml, which will allow it to continue attempting to start up. Once the MySQL scripts have completed, Servatrice should then connect automatically on the next attempt.
Docker compose in Windows A out of box working docker-compose file has been added to help setup in Windows.
Docker in Windows requires additional steps in form of using Docker Desktop to allow resource sharing from the drive the volumes are mapped from, as well as potential workarounds needed to get file sharing working in Windows. This StackOverflow discussion sheds some light on it
License 
Cockatrice is free software, licensed under the GPLv2.