123456789101112131415161718192021222324252627282930
void checkrun1 () { for (unsigned j = 0; j < hand1.size() - 2; ++j) { for (unsigned q = 0; q < hand1.size() - 2; ++q) { for (unsigned m = 0; m < hand1.size() - (j + q);) { if (hand1[j]->getvalue() == hand1[j+q]->getvalue() + 1) { if (hand1[j+q]->getvalue() == hand1[j+q+m]->getvalue() + 1) { tscore1 += 3; if (hand1[j + 2]->getvalue() == hand1[j+3]->getvalue() + 1) { tscore1 += 1; cout << "run of 4 = 4 points" << endl; break; } else { cout << "run of 3 = 3 points" << endl; } } } } } } }
123
hand1[j+q] //and hand1[j+q+m]