Brunot
Loading...
Searching...
No Matches
HandFinder.h
Go to the documentation of this file.
1// File: HandFinder.h
2// Description: The class that goes through a vector of cards and returns a vector of cards ranging from size 1 to 5.
3// Author(s): Ori Balashov (ori.balashov@digipen.edu) pair programmed with Bryley
4// Bryley Elder (bryley.elder@digipen.edu) Pair Programmed with Ori
5// 2025 / 10 / 17
6// (C) Digipen 2025
7// ____ __ __ __
8// /\__ _\/\ \ /\ \/\ \
9// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
10// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
11// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
12// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
13// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
14#pragma once
15#include <vector>
16
17class Card;
18
20{
21 std::vector<Card> playerHandCards;
22};
23
25{
26public:
32 static auto findHandsInVector(const std::vector<Card>& cardsVector) -> std::vector<PlayerHand>;
33
34private:
41 static auto makePlayerHand(const std::vector<Card>& cardsVector, int startIndex) -> PlayerHand;
42
50 static auto makeRangedHand(const std::vector<Card>& cardsVector, int startIndex, int endIndex) -> PlayerHand;
51
52};
Definition Card.h:34
Definition HandFinder.h:25
static auto makePlayerHand(const std::vector< Card > &cardsVector, int startIndex) -> PlayerHand
Goes through a vector and makes a playerHand from startIndex to 5 cards forward.
Definition HandFinder.cpp:82
static auto makeRangedHand(const std::vector< Card > &cardsVector, int startIndex, int endIndex) -> PlayerHand
Generates a hand from a card vector from the start index up to the end index.
Definition HandFinder.cpp:95
static auto findHandsInVector(const std::vector< Card > &cardsVector) -> std::vector< PlayerHand >
Takes in a line of cards, and returns every possible hand that was contributed to this turn.
Definition HandFinder.cpp:19
Definition HandFinder.h:20
std::vector< Card > playerHandCards
Definition HandFinder.h:21