Hello, please accept my apologies if am posting this in the wrong place.
The problem is that when one of the players gets pairs,it is comparing the wrong way or not comparing at all. I put comments in the lines I need help with.
Due to space issues I could not put the code here. It won't let me publish it because it is too long, I am sorry about that.
Thank you for the help.
I also uploaded the whole project into mediafire to this link in case someone needs to see what actually goes on. You just need to download one.
Here it is, this is what I believe is causing me the problem. I am still looking into that.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
bool SortedEvaluator::isTPair(const vector<const Card*>& hand) //This is the code that does not want to work
{
cout << "isTPair is being called (This is what is not working";
return((hand[0] -> GetPip() == hand[1] -> GetPip() && hand[2] -> GetPip() == hand[3] -> GetPip()) ||
(hand[1] -> GetPip() == hand[2] -> GetPip() && hand[3] -> GetPip() == hand[4] -> GetPip()) ||
(hand[0] -> GetPip() == hand[1] -> GetPip() && hand[3] -> GetPip() == hand[4] -> GetPip()));
}
bool SortedEvaluator::isPair(const vector<const Card*>& hand) //This is the code that does not want to work
{
cout << "isPair is being called (This is what is not working)";
return((hand[0] -> GetPip() == hand[1] -> GetPip()) || (hand[2] -> GetPip() == hand[3] -> GetPip()) ||
(hand[1] -> GetPip() == hand[2] -> GetPip()) || (hand[3] -> GetPip() == hand[4] -> GetPip()));
}