Brunot
Loading...
Searching...
No Matches
HandFinder Class Reference

#include <HandFinder.h>

Static Public Member Functions

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.

Static Private Member Functions

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.
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.

Member Function Documentation

◆ findHandsInVector()

auto HandFinder::findHandsInVector ( const std::vector< Card > & cardsVector) ->std::vector< PlayerHand >
static

Takes in a line of cards, and returns every possible hand that was contributed to this turn.

Parameters
cardsVectora column or row of cards to check
Returns
A vector of every possible hand on the board that was contributed to this turn
Here is the call graph for this function:
Here is the caller graph for this function:

◆ makePlayerHand()

auto HandFinder::makePlayerHand ( const std::vector< Card > & cardsVector,
int startIndex )->PlayerHand
staticprivate

Goes through a vector and makes a playerHand from startIndex to 5 cards forward.

Parameters
cardsVectorThe vector which you want to make hands from
startIndexThe index where you want to start copying from
Returns
The player hand it made
Here is the caller graph for this function:

◆ makeRangedHand()

auto HandFinder::makeRangedHand ( const std::vector< Card > & cardsVector,
int startIndex,
int endIndex )->PlayerHand
staticprivate

Generates a hand from a card vector from the start index up to the end index.

Parameters
cardsVectorThe vector you want to go through
startIndexWhere you want to start copying.
endIndexWhere you want to stop copying. Does not copy at this value
Returns
The player hand it made
Here is the caller graph for this function:

The documentation for this class was generated from the following files:
  • /home/egrazil/sites/Brunot/The House/source/Gameplay/Framework/HandFinder.h
  • /home/egrazil/sites/Brunot/The House/source/Gameplay/Framework/HandFinder.cpp