Brunot
Loading...
Searching...
No Matches
CategorizedHand.h
Go to the documentation of this file.
1
11// ____ __ __ __
12// /\__ _\/\ \ /\ \/\ \
13// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
14// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
15// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
16// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
17// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
18
19
20#pragma once
21
22#include <vector>
23
24#include "Component/Card.h"
26
27struct CardSet;
28class Card;
29
31{
32 CategorizedHand() = default;
33 CategorizedHand(HandRating::HandType type, const std::vector<Card>& cards);
34
35 auto getSum() const -> int;
36 auto getScore() const -> int;
37 auto getType() const -> HandRating::HandType;
38 auto getCards() const -> const std::vector<Card>&;
39
40 auto setHandType(HandRating::HandType newType) -> void;
41
46 auto setCards(const std::vector<Card>& newCards) -> void;
47
52 auto addCard(const Card& newCard) -> void;
53
58 auto getAsString() const -> std::string;
59
63 auto printCards() const -> void;
64
65private:
66 HandRating::HandType typeOfHand = HandRating::HandType::nothing;
67 std::vector<Card> importantCards;
68};
The card component that is moved around on the board.
A class that can get the score of a hand.
Definition Card.h:34
Definition HandRating.h:30
HandType
Definition HandRating.h:35
auto addCard(const Card &newCard) -> void
Pushes back a new card into the card vector.
Definition CategorizedHand.cpp:57
auto setHandType(HandRating::HandType newType) -> void
Definition CategorizedHand.cpp:47
auto getType() const -> HandRating::HandType
Definition CategorizedHand.cpp:37
HandRating::HandType typeOfHand
Definition CategorizedHand.h:66
auto getCards() const -> const std::vector< Card > &
Definition CategorizedHand.cpp:42
auto getSum() const -> int
Definition CategorizedHand.cpp:22
auto getAsString() const -> std::string
Constructs a string that represents the data in the hand.
Definition CategorizedHand.cpp:62
std::vector< Card > importantCards
Definition CategorizedHand.h:67
CategorizedHand()=default
auto setCards(const std::vector< Card > &newCards) -> void
Sets the entire card vector at once.
Definition CategorizedHand.cpp:52
auto printCards() const -> void
Prints out all the cards that comprise the hand in the log.
Definition CategorizedHand.cpp:67
auto getScore() const -> int
Definition CategorizedHand.cpp:32