Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
card_list.cpp File Reference
#include "card_list.h"
#include "card_item.h"
#include <QDebug>
#include <algorithm>
#include <libcockatrice/card/card_info.h>
Include dependency graph for card_list.cpp:

Functions

static QString getColorSortString (const CardInfo &c, bool appendAtEnd)

Function Documentation

◆ getColorSortString()

QString getColorSortString ( const CardInfo & c,
bool appendAtEnd )
static

Creates a String for the card such that when sorting cards using that string, it will result in the following sort order:

  • Unrecognized colors
  • Land cards
  • Colorless cards
  • Monocolor cards, in wubrg order
  • Monocolor cards of any custom colors
  • 2C cards (no internal order)
  • 3C cards (no internal order)
  • 4C cards (no internal order)
  • 5C cards (no internal order)
Parameters
cThe card info
appendAtEndFor multicolor cards, whether to also append the entire color string at the end.
Here is the call graph for this function:
Here is the caller graph for this function: