Study Dungeon  1.0.0
A group project for COSC345
Public Member Functions
PlayingCard Class Reference

Class to define the playing card object. More...

#include <playing_card.h>

Public Member Functions

 PlayingCard ()
 Construct a new Playing Card object. More...
 
 PlayingCard (enum Type cardType, int value)
 Construct a new Playing Card object. More...
 
bool operator== (PlayingCard &other)
 Compares another PlayingCard object to this. More...
 
int getValue ()
 Returns the value of the card. More...
 
enum Type getType ()
 Returns the target of the card. More...
 
std::string toString ()
 Converts this PlayingCard object to string. More...
 

Detailed Description

Class to define the playing card object.

Constructor & Destructor Documentation

◆ PlayingCard() [1/2]

PlayingCard::PlayingCard ( )

Construct a new Playing Card object.

Default Constructor.

◆ PlayingCard() [2/2]

PlayingCard::PlayingCard ( enum Type  cardType,
int  value 
)

Construct a new Playing Card object.

Parameters
targetthe target of the card
cardTypethe effect of the card
valuethe value modifier of the card

Member Function Documentation

◆ getType()

enum Type PlayingCard::getType ( )

Returns the target of the card.

Returns
true
false

Get the type of the card

Returns
enum Type the type

◆ getValue()

int PlayingCard::getValue ( )

Returns the value of the card.

Returns
int the value of the card.

◆ operator==()

bool PlayingCard::operator== ( PlayingCard other)

Compares another PlayingCard object to this.

Comparas another PlayingCard object to this. Returns true if both PlayingCard objects possess the same member values. Returns false otherwise.

Parameters
otherThe card to compare this to.
Returns
true
false

◆ toString()

std::string PlayingCard::toString ( )

Converts this PlayingCard object to string.

Returns
std::string the string version of this PlayingCard.

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