Simple Poker Template 0.0.1
Loading...
Searching...
No Matches
SimplePoker.Logic.Deck Class Reference

Class representing a deck of playing cards. More...

Inheritance diagram for SimplePoker.Logic.Deck:

Public Member Functions

void MakeDeck (int quantity=1)
 Creates a deck of cards, in which a deck represents 52 cards.
 
void OrganizeCardsPositionInDeck ()
 Organizes the position of cards in the deck.
 
void ShuffleDeck ()
 Shuffles the deck.
 
void DestroyDeck ()
 Destroys the entire deck, clear lists.
 
void RemoveCardFromDeck (Card card)
 Removes a specific card from the deck.
 
void RemoveCardsBySameValueFromDeck (Card.VALUE value)
 Removes all cards with the same value from the deck.
 
void AddCardToDeck (Card card)
 Adds a card to the deck.
 
void AddListOfCardToDeck (List< Card > listCards)
 Adds a list of cards to the deck.
 
void AddCardToListCardsInGame (Card card)
 Adds a card to the list of cards in the game.
 
Card GetFirstCardFromDeck ()
 Gets the first card from the list of card (deck).
 
Card GetLastCardFromDeck ()
 Gets the last card from the list of card (deck).
 
Card GetCardByValueAndSuit (Card.VALUE value, Card.SUIT suit)
 Gets a card by its value and suit from the deck.
 
List< CardSelectCards (List< Card > cardsToSelect)
 Selects cards from the deck based on a list of cards to select.
 
bool IsValidCardOperation ()
 Checks whether the current deck's operation is valid, such as whether the deck has at least one card.
 
void ResetDeck ()
 Resets the deck to its initial state.
 

Properties

DeckData DeckData [get]
 
List< CardCards [get]
 
List< CardCardsInGame [get]
 

Detailed Description

Class representing a deck of playing cards.

Creating, shuffling, and managing the deck.

Member Function Documentation

◆ AddCardToDeck()

void SimplePoker.Logic.Deck.AddCardToDeck ( Card card)

Adds a card to the deck.

Parameters
cardThe card to add.

◆ AddCardToListCardsInGame()

void SimplePoker.Logic.Deck.AddCardToListCardsInGame ( Card card)

Adds a card to the list of cards in the game.

Parameters
cardThe card to add.

◆ AddListOfCardToDeck()

void SimplePoker.Logic.Deck.AddListOfCardToDeck ( List< Card > listCards)

Adds a list of cards to the deck.

Parameters
listCardsThe list of cards to add.

◆ DestroyDeck()

void SimplePoker.Logic.Deck.DestroyDeck ( )

Destroys the entire deck, clear lists.

◆ GetCardByValueAndSuit()

Card SimplePoker.Logic.Deck.GetCardByValueAndSuit ( Card::VALUE value,
Card::SUIT suit )

Gets a card by its value and suit from the deck.

Parameters
valueThe value of the card.
suitThe suit of the card.
Returns
The card matching the specified value and suit.

◆ GetFirstCardFromDeck()

Card SimplePoker.Logic.Deck.GetFirstCardFromDeck ( )

Gets the first card from the list of card (deck).

Returns
The first card in the deck.

◆ GetLastCardFromDeck()

Card SimplePoker.Logic.Deck.GetLastCardFromDeck ( )

Gets the last card from the list of card (deck).

Returns
The last card in the deck.

◆ IsValidCardOperation()

bool SimplePoker.Logic.Deck.IsValidCardOperation ( )

Checks whether the current deck's operation is valid, such as whether the deck has at least one card.

Returns
True if the operation is valid, otherwise false.

◆ MakeDeck()

void SimplePoker.Logic.Deck.MakeDeck ( int quantity = 1)

Creates a deck of cards, in which a deck represents 52 cards.

Parameters
quantityThe number of decks to create.

◆ OrganizeCardsPositionInDeck()

void SimplePoker.Logic.Deck.OrganizeCardsPositionInDeck ( )

Organizes the position of cards in the deck.

◆ RemoveCardFromDeck()

void SimplePoker.Logic.Deck.RemoveCardFromDeck ( Card card)

Removes a specific card from the deck.

Parameters
cardThe card to remove.

◆ RemoveCardsBySameValueFromDeck()

void SimplePoker.Logic.Deck.RemoveCardsBySameValueFromDeck ( Card::VALUE value)

Removes all cards with the same value from the deck.

Parameters
valueThe value of the cards to remove.

◆ ResetDeck()

void SimplePoker.Logic.Deck.ResetDeck ( )

Resets the deck to its initial state.

◆ SelectCards()

List< Card > SimplePoker.Logic.Deck.SelectCards ( List< Card > cardsToSelect)

Selects cards from the deck based on a list of cards to select.

Parameters
cardsToSelectThe list of cards to select from the deck.
Returns
The selected cards.

◆ ShuffleDeck()

void SimplePoker.Logic.Deck.ShuffleDeck ( )

Shuffles the deck.

Property Documentation

◆ Cards

List<Card> SimplePoker.Logic.Deck.Cards
get

◆ CardsInGame

List<Card> SimplePoker.Logic.Deck.CardsInGame
get

◆ DeckData

DeckData SimplePoker.Logic.Deck.DeckData
get

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