Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
playmat_resolver.h File Reference
Include dependency graph for playmat_resolver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PlaymatInfo resolveEffectivePlaymat (const DeckList &deck, const PlaymatInfo &force, const QList< PlaymatInfo > &fallbackList, PlaymatFallbackMode fallbackMode, int rotationIndex)
 Resolves the effective playmat for a deck per the resolution chain: force override > deck-configured playmat > fallback list > none.
PlaymatInfo resolvePlaymatForDeck (const DeckList &deck, const QList< PlaymatInfo > &fallbackList, PlaymatMode mode, PlaymatFallbackMode fallbackBehavior, int rotationIndex)
 Resolves the playmat to display for a deck according to the user's collection mode (PlaymatMode), combining the deck with the given fallback list.

Function Documentation

◆ resolveEffectivePlaymat()

PlaymatInfo resolveEffectivePlaymat ( const DeckList & deck,
const PlaymatInfo & force,
const QList< PlaymatInfo > & fallbackList,
PlaymatFallbackMode fallbackMode,
int rotationIndex )

Resolves the effective playmat for a deck per the resolution chain: force override > deck-configured playmat > fallback list > none.

Parameters
deckThe deck to resolve a playmat for.
forceAn optional user-level override; wins over everything. Pass an empty PlaymatInfo::card to skip it.
fallbackListUser-level fallback playmats, consulted only when the deck has no configured playmat.
fallbackModeHow fallbackList is consulted (ignored when empty).
rotationIndexIn/out cursor for PlaymatFallbackModeRoundRobin; advanced once per call. Unused for the other modes.
Returns
The effective playmat; an empty PlaymatInfo::card when nothing in the chain resolves.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolvePlaymatForDeck()

PlaymatInfo resolvePlaymatForDeck ( const DeckList & deck,
const QList< PlaymatInfo > & fallbackList,
PlaymatMode mode,
PlaymatFallbackMode fallbackBehavior,
int rotationIndex )

Resolves the playmat to display for a deck according to the user's collection mode (PlaymatMode), combining the deck with the given fallback list.

Parameters
deckThe deck to resolve a playmat for.
fallbackListUser-level fallback playmats.
modeHow the collection interacts with the deck-configured playmat.
fallbackBehaviorHow fallbackList is picked from.
rotationIndexCursor for PlaymatFallbackModeRoundRobin.
Returns
The effective playmat; an empty PlaymatInfo::card when nothing resolves.
Here is the call graph for this function:
Here is the caller graph for this function: