-
Notifications
You must be signed in to change notification settings - Fork 0
na1x/DeCore
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The "DeCore" is a Russian card game engine. Developed with c++ the engine is aimed to be cross-platform and portable (where c++ is available). Please refer to wiki documentation for further details. Requirements: decore lib: - pthreads tests: - pthreads - cppunit Building library: cd decore && qmake decore.pro && make Building tests (is not required for the users though): cd tests && qmake tests.pro && make Or to build library and tests at once: qmake all.pro && make Building doxygen documentation: doxygen doxygen.cfg Sample usage of the library: YourPlayerImplementation player0, player1; YourObserverImplementation observer; Engine engine; // add players engine.add(player0); engine.add(player1); // add optional observer engine.addGameObserver(observer); // prepare deck Deck deck; Rank ranks[] = { RANK_6, RANK_7, RANK_8, RANK_9, RANK_10, RANK_JACK, RANK_QUEEN, RANK_KING, RANK_ACE, }; Suit suits[] = { SUIT_SPADES, SUIT_HEARTS, SUIT_DIAMONDS, SUIT_CLUBS, }; deck.generate(ranks, sizeof(ranks) / sizeof(ranks[0]), suits, sizeof(suits) / sizeof(suits[0])); deck.shuffle(); // set deck engine.setDeck(deck); // play game while(engine.playRound()); // get loser // loser is NULL in case of draw const PlayerId* loser = engine.getLoser();
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published