|
NetMauMau
0.17.1
Client API
|
Common classes and functions used by clients and server as well
#include "cardtools.h" to use the tool functions.
Namespaces | |
| Exception | |
| Exceptions thrown in both clients and the server. | |
Classes | |
| class | AbstractConnection |
| Abstract connection class. More... | |
| interface | ICard |
| Describes a playing card. More... | |
| interface | IConnection |
| Interface to a connection. More... | |
Functions | |
Card SUIT helpers | |
| const std::string * | getSuitSymbols () |
Get an array of the four SUIT symbols. More... | |
| std::string | ansiSuit (const std::string &suit) |
Converts a SUIT symbol to a ANSI color representation. More... | |
| NetMauMau::Common::ICard::SUIT | symbolToSuit (const std::string &symbol) |
| Converts a symbol to a NetMauMau::Common::ICard::SUIT. More... | |
| std::string | suitToSymbol (NetMauMau::Common::ICard::SUIT suit, bool ansi, bool endansi=false) |
| Converts a NetMauMau::Common::ICard::SUIT to a symbol. More... | |
Card description | |
| bool | parseCardDesc (const std::string &desc, NetMauMau::Common::ICard::SUIT *suit, NetMauMau::Common::ICard::RANK *rank) |
| Parses a textual description. More... | |
| std::string | createCardDesc (NetMauMau::Common::ICard::SUIT suite, NetMauMau::Common::ICard::RANK rank, bool ansi) |
| Creates a card description. More... | |
Sorting cards | |
| unsigned int | suitOrderPosition (NetMauMau::Common::ICard::SUIT suit) |
Gets an ordinal number for a SUIT. More... | |
| unsigned int | rankOrderPosition (NetMauMau::Common::ICard::RANK rank) |
Gets an ordinal number for a RANK. More... | |
| bool | cardEqual (const NetMauMau::Common::ICard *x, const NetMauMau::Common::ICard *y) |
| Checks if two cards are equal. More... | |
| bool | cardLess (const NetMauMau::Common::ICard *x, const NetMauMau::Common::ICard *y) |
| Checks if a card comes before another. More... | |
| bool | cardGreater (const NetMauMau::Common::ICard *x, const NetMauMau::Common::ICard *y) |
| Checks if a card comes before another. More... | |
Identifying and finding cards | |
| bool | isSuit (const NetMauMau::Common::ICard *card, NetMauMau::Common::ICard::SUIT suit) |
Checks if the a card is of SUIT. More... | |
| bool | isRank (const NetMauMau::Common::ICard *card, NetMauMau::Common::ICard::RANK rank) |
Checks if the a card is of RANK. More... | |
| template<typename Iterator > | |
| Iterator::value_type | findSuit (NetMauMau::Common::ICard::SUIT suit, Iterator first, Iterator last) |
Finds the first card of a given SUIT. More... | |
| template<typename Iterator > | |
| Iterator::value_type | findRank (NetMauMau::Common::ICard::RANK rank, Iterator first, Iterator last) |
Finds the first card of a given RANK. More... | |
| template<typename Iterator > | |
| Iterator::value_type | findCard (typename Iterator::value_type card, Iterator first, Iterator last) |
| Finds the first card equal to a given card. More... | |
Miscellaneous functions | |
| NetMauMau::Common::ICard * | getIllegalCard () |
| Gets an illegal card card to trigger special actions. More... | |
| std::size_t | getCardPoints (NetMauMau::Common::ICard::RANK rank) |
Gets the points of a RANK. More... | |
| const char * | getServerExe () |
| Gets the executable name of the server. More... | |
Variables | |
| const std::string | DefaultPlayerImage |
std::string containing the default player image in PNG format More... | |
1.8.8