string msg;
if (abs(score1 - score2) >= 3) {
msg = "Game ends after this point";
- } else if (score1 >= 12 || score2 >= 12) {
- msg = "Point cap: First to 13";
} else {
- char buf[32];
- snprintf(buf, sizeof(buf), "Pagacap: First to %d", max(score1, score2) + 1);
- msg = buf;
+ int cap = max(score1, score2) + 1;
+ if (score1 == score2) ++cap;
+
+ if (cap >= 13) {
+ msg = "Point cap: First to 13";
+ } else {
+ char buf[32];
+ snprintf(buf, sizeof(buf), "Pagacap: First to %d", cap);
+ msg = buf;
+ }
}
ui->autocomment_edit->setText(QString::fromStdString(msg));
}