Cards class. More...

#include <Rosetta/Cards/Cards.hpp>

Public Member Functions

 Cards (const Cards &cards)=delete
 Deleted copy constructor. More...
 
 Cards (Cards &&cards)=delete
 Deleted move constructor. More...
 
Cardsoperator= (const Cards &cards)=delete
 Deleted copy assignment operator. More...
 
Cardsoperator= (Cards &&cards)=delete
 Deleted move assignment operator. More...
 
const std::vector< Card > & GetAllCards () const
 
Card FindCardByID (const std::string &id)
 
std::vector< CardFindCardByRarity (Rarity rarity)
 
std::vector< CardFindCardByClass (CardClass cardClass)
 
std::vector< CardFindCardBySet (CardSet cardSet)
 
std::vector< CardFindCardByType (CardType cardType)
 
std::vector< CardFindCardByRace (Race race)
 
Card FindCardByName (const std::string &name)
 
std::vector< CardFindCardByCost (std::size_t minVal, std::size_t maxVal)
 
std::vector< CardFindCardByAttack (std::size_t minVal, std::size_t maxVal)
 
std::vector< CardFindCardByHealth (std::size_t minVal, std::size_t maxVal)
 
std::vector< CardFindCardBySpellDamage (std::size_t minVal, std::size_t maxVal)
 
std::vector< CardFindCardByMechanics (std::vector< GameTag > mechanics)
 
Card GetHeroCard (CardClass cardClass)
 
Card GetDefaultHeroPower (CardClass cardClass)
 

Static Public Member Functions

static CardsGetInstance ()
 

Detailed Description

Cards class.

This class stores a list of cards and provides several search methods.

Constructor & Destructor Documentation

◆ Cards() [1/2]

RosettaStone::Cards::Cards ( const Cards cards)
delete

Deleted copy constructor.

◆ Cards() [2/2]

RosettaStone::Cards::Cards ( Cards &&  cards)
delete

Deleted move constructor.

Member Function Documentation

◆ FindCardByAttack()

std::vector<Card> RosettaStone::Cards::FindCardByAttack ( std::size_t  minVal,
std::size_t  maxVal 
)

Returns a list of cards whose attack is between minVal and maxVal.

Parameters
minValThe minimum attack value of the card.
maxValThe maximum attack value of the card.
Returns
A list of cards that matches condition.

◆ FindCardByClass()

std::vector<Card> RosettaStone::Cards::FindCardByClass ( CardClass  cardClass)

Returns a list of cards that matches cardClass.

Parameters
cardClassThe class of the card.
Returns
A list of cards that matches condition.

◆ FindCardByCost()

std::vector<Card> RosettaStone::Cards::FindCardByCost ( std::size_t  minVal,
std::size_t  maxVal 
)

Returns a list of cards whose cost is between minVal and maxVal.

Parameters
minValThe minimum cost value of the card.
maxValThe maximum cost value of the card.
Returns
A list of cards that matches condition.

◆ FindCardByHealth()

std::vector<Card> RosettaStone::Cards::FindCardByHealth ( std::size_t  minVal,
std::size_t  maxVal 
)

Returns a list of cards whose health is between minVal and maxVal.

Parameters
minValThe minimum health value of the card.
maxValThe maximum health value of the card.
Returns
A list of cards that matches condition.

◆ FindCardByID()

Card RosettaStone::Cards::FindCardByID ( const std::string &  id)

Returns a card that matches id.

Parameters
idThe ID of the card.
Returns
A card that matches id.

◆ FindCardByMechanics()

std::vector<Card> RosettaStone::Cards::FindCardByMechanics ( std::vector< GameTag >  mechanics)

Returns a list of cards that has mechanics.

Parameters
mechanicsThe mechanics of the card.
Returns
A list of cards that matches condition.

◆ FindCardByName()

Card RosettaStone::Cards::FindCardByName ( const std::string &  name)

Returns a card that matches name.

Parameters
nameThe name of the card.
Returns
A card that matches condition.

◆ FindCardByRace()

std::vector<Card> RosettaStone::Cards::FindCardByRace ( Race  race)

Returns a list of cards that matches race.

Parameters
raceThe race of the card.
Returns
A list of cards that matches condition.

◆ FindCardByRarity()

std::vector<Card> RosettaStone::Cards::FindCardByRarity ( Rarity  rarity)

Returns a list of cards that matches rarity.

Parameters
rarityThe rarity of the card.
Returns
A list of cards that matches condition.

◆ FindCardBySet()

std::vector<Card> RosettaStone::Cards::FindCardBySet ( CardSet  cardSet)

Returns a list of cards that matches cardSet.

Parameters
cardSetThe set of the card.
Returns
A list of cards that matches condition.

◆ FindCardBySpellDamage()

std::vector<Card> RosettaStone::Cards::FindCardBySpellDamage ( std::size_t  minVal,
std::size_t  maxVal 
)

Returns a list of cards whose damage is between minVal and maxVal.

Parameters
minValThe minimum spell damage value of the card.
maxValThe maximum spell damage value of the card.
Returns
A list of cards that matches condition.

◆ FindCardByType()

std::vector<Card> RosettaStone::Cards::FindCardByType ( CardType  cardType)

Returns a list of cards that matches cardType.

Parameters
cardTypeThe type of the card.
Returns
A list of cards that matches condition.

◆ GetAllCards()

const std::vector<Card>& RosettaStone::Cards::GetAllCards ( ) const

Returns a list of all cards.

Returns
A list of all cards.

◆ GetDefaultHeroPower()

Card RosettaStone::Cards::GetDefaultHeroPower ( CardClass  cardClass)

Returns a default hero power card that matches cardClass.

Parameters
cardClassThe class of the card.
Returns
A default hero power card that matches condition.

◆ GetHeroCard()

Card RosettaStone::Cards::GetHeroCard ( CardClass  cardClass)

Returns a hero card that matches cardClass.

Parameters
cardClassThe class of the card.
Returns
A hero card that matches condition.

◆ GetInstance()

static Cards& RosettaStone::Cards::GetInstance ( )
static

Returns an instance of Cards class.

Returns
An instance of Cards class.

◆ operator=() [1/2]

Cards& RosettaStone::Cards::operator= ( const Cards cards)
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

Cards& RosettaStone::Cards::operator= ( Cards &&  cards)
delete

Deleted move assignment operator.


The documentation for this class was generated from the following file: