* improve loading from plain text Fixes the loadFromStream_Plain function that is used to load plain text decklists. The rewritten function uses more regexes and is a bit cleaner. This fixes multiple bugs with loading the various sources of decklists. Note that the new function still has a few issues that are shared with the original version like creating duplicate cards. * clang format comments apparently clang-format even complains about the spacing in your comments * refactor loading_from_clipboard tests Remove all heap allocation and use references. Use std::pair and std::string so gtest will show the cardnames in error messages. (note that using QPair or QString does not work with gtest) Improve the last two testcases to include weird names; and name and comments testing. Remove empty header file. * fix compatibility with more formats skip "sideboard" line include everything in mainboard when there are multiple empty lines add removal of the mwdeck cardversion selector in round braces add replacal of lowercase ae combination that should never occur Set cardname to lowercase as apparently our checks are hardcoded to only accept lowercase. * remove bugged test The current load from plain is simply broken, removed checking the comments for correct contents. * rework load_from_clipboard tests again rework the test to have less code duplication add more tests and more special cases note that text is still all lowercase * improve loading from plain text Fixes the loadFromStream_Plain function that is used to load plain text decklists. The rewritten function uses more regexes and is a bit cleaner. This fixes multiple bugs with loading the various sources of decklists. Note that the new function still has a few issues that are shared with the original version like creating duplicate cards. * clang format comments apparently clang-format even complains about the spacing in your comments * refactor loading_from_clipboard tests Remove all heap allocation and use references. Use std::pair and std::string so gtest will show the cardnames in error messages. (note that using QPair or QString does not work with gtest) Improve the last two testcases to include weird names; and name and comments testing. Remove empty header file. * fix compatibility with more formats skip "sideboard" line include everything in mainboard when there are multiple empty lines add removal of the mwdeck cardversion selector in round braces add replacal of lowercase ae combination that should never occur Set cardname to lowercase as apparently our checks are hardcoded to only accept lowercase. * remove bugged test The current load from plain is simply broken, removed checking the comments for correct contents. * rework load_from_clipboard tests again rework the test to have less code duplication add more tests and more special cases note that text is still all lowercase * remove forcing of lowercase cardnames Cardnames in DeckList::loadFromStream_Plain will no longer be forced lowercase if they aren't found in the database. Empty lines in the comments of plaintext decklists will not be skipped. The loading_from_clipboard_test gets its functions declared in a separate header "clipboard_testing.h". Add more edgecase tests. Refactor code. * add old QHash version support QT 5.5 does not support using initializer lists for QHash. Implement a preprocessor version check for conditionally using inserts instead of a const with initializer list. * add old QHash version support QT 5.5 does not support using initializer lists for QHash. Implement a preprocessor version check for conditionally using [] access instead of a const with initializer list. * add qHash on QRegularExpression below QT 5.6 Apparently QRegularExpression can't be hashed in lower QT versions, so we add our own hash function, and everyone lived happily ever after, and none the wiser. * add header guards to clipboard_testing.h |
||
---|---|---|
.ci | ||
.github | ||
.tx | ||
cmake | ||
cockatrice | ||
common | ||
doc | ||
oracle | ||
servatrice | ||
tests | ||
webclient | ||
.appveyor.yml | ||
.clang-format | ||
.codacy.yml | ||
.dockerignore | ||
.gitignore | ||
.gitlab-ci.yml | ||
.travis.yml | ||
clangify.sh | ||
CMakeLists.txt | ||
Dockerfile | ||
LICENSE | ||
README.md |
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.
Full releases are checkpoints featuring major feature or UI enhancements - we recommend to use those. There is no strict schedule for new full releases.
The beta release contains the most recently added features and bugfixes, but can be unstable. They are released as we feel need.
-
- Beta versions may be unstable and contain bugs.
- To be a Cockatrice Beta Tester, use this version. Find more information here!
Get Involved 
Chat with the Cockatrice developers on Gitter. 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.
Read the long-term project roadmap to see planned edits and milestones here.
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 and Oracle to your language or just edit single wordings right from within your browser by visiting our Transifex project page.
Cockatrice | Oracle |
---|---|
Check out our Translator FAQ for more information about contributing!
Build

Detailed compiling instructions are on the Cockatrice wiki under Compiling Cockatrice
Dependencies: (for minimum requirements search our CMake file)
Oracle can optionally use zlib to load zipped 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=1
Whether to build the server (default 0 = no).-DWITH_CLIENT=0
Whether to build the client (default 1 = yes).-DWITH_ORACLE=0
Whether to build oracle (default 1 = yes).-DCMAKE_BUILD_TYPE=Debug
Compile in debug mode. Enables extra logging output, debug symbols, and much more verbose compiler warnings (defaultRelease
).-DWARNING_AS_ERROR=0
Whether to treat compilation warnings as errors in debug mode (default 1 = yes).-DUPDATE_TRANSLATIONS=1
Configuremake
to update the translation .ts files for new strings in the source code. Note: Runningmake clean
will remove the .ts files (default 0 = no).-DTEST=1
Enable regression tests (default 0 = no). Note: needs googletest, will be downloaded on the fly if unavailable. To run tests:make test
.
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.
License 
Cockatrice is free software, licensed under the GPLv2.