Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
SideboardPlan Class Reference

Represents a predefined sideboarding strategy for a deck. More...

#include <deck_list.h>

Public Member Functions

 SideboardPlan (const QString &_name=QString(), const QList< MoveCard_ToZone > &_moveList=QList< MoveCard_ToZone >())
 Construct a new SideboardPlan.
bool readElement (QXmlStreamReader *xml)
 Read a SideboardPlan from an XML stream.
void write (QXmlStreamWriter *xml)
 Write this SideboardPlan to XML.
QString getName () const
const QList< MoveCard_ToZone > & getMoveList () const
void setMoveList (const QList< MoveCard_ToZone > &_moveList)
 Replace the move list with a new one.

Private Attributes

QString name
 Human-readable name of this plan.
QList< MoveCard_ToZone > moveList
 List of move instructions for this plan.

Detailed Description

Represents a predefined sideboarding strategy for a deck.

Sideboard plans store a named list of card movements that should be applied between the mainboard and sideboard for a specific matchup. Each movement is expressed using a MoveCard_ToZone protobuf message.

Responsibilities:

  • Store the plan name and list of moves.
  • Support XML serialization/deserialization.

Typical usage:

A deck can contain multiple sideboard plans (e.g., "vs Aggro", "vs Control"), each describing how to transform the main deck into its intended configuration.

Constructor & Destructor Documentation

◆ SideboardPlan()

SideboardPlan::SideboardPlan ( const QString & _name = QString(),
const QList< MoveCard_ToZone > & _moveList = QList<MoveCard_ToZone>() )
explicit

Construct a new SideboardPlan.

Parameters
_nameThe plan name.
_moveListInitial list of card move instructions.

Member Function Documentation

◆ getMoveList()

const QList< MoveCard_ToZone > & SideboardPlan::getMoveList ( ) const
inlinenodiscard
Returns
Const reference to the move list.
Here is the caller graph for this function:

◆ getName()

QString SideboardPlan::getName ( ) const
inlinenodiscard
Returns
The plan name.
Here is the caller graph for this function:

◆ readElement()

bool SideboardPlan::readElement ( QXmlStreamReader * xml)

Read a SideboardPlan from an XML stream.

Parameters
xmlXML reader positioned at the plan element.
Returns
true if parsing succeeded.
Here is the caller graph for this function:

◆ setMoveList()

void SideboardPlan::setMoveList ( const QList< MoveCard_ToZone > & _moveList)

Replace the move list with a new one.

Here is the caller graph for this function:

◆ write()

void SideboardPlan::write ( QXmlStreamWriter * xml)

Write this SideboardPlan to XML.

Parameters
xmlStream to append the serialized element to.

Member Data Documentation

◆ moveList

QList<MoveCard_ToZone> SideboardPlan::moveList
private

List of move instructions for this plan.

◆ name

QString SideboardPlan::name
private

Human-readable name of this plan.


The documentation for this class was generated from the following files:
  • libcockatrice_deck_list/libcockatrice/deck_list/deck_list.h
  • libcockatrice_deck_list/libcockatrice/deck_list/deck_list.cpp