#Attempting to check for a pair for a split in my blackjack game... can anyone help?

12 messages · Page 1 of 1 (latest)

swift scroll
#

Just a little blackjack project that I'm making, almost done with it just need to add some extra checks for if the pairing system would check for a pair and then be able to split the hand.

hexed siloBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

swift scroll
#

not sure exactly where to go from where I'm at

#

but I'm a little stuck on figuring out how to actually create the checking function to see if the player has a pair in their hand to be able to split

abstract marten
#

count how many cards of each card.value are in the hand

#

you can do that with std::unordered_map for example

#

any that have count > 1 are pairs at least

swift scroll
#

okay perfect

#

thanks doggo 😎

hexed siloBOT
#

@swift scroll Has your question been resolved? If so, run !solved :)

swift scroll
#

!solved