Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #32 #33

Merged
merged 1 commit into from
Jun 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Mahjong/ScoreCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,15 @@ bool 带幺九(const string &s) {

/* 牌型对/刻/杠,全幺九,不包括字牌,例如999p 1111m */
bool 纯老头(const string &s) {
if (s[2] == 'K' || s[2] == ':' || s[2] == '|') return s[0] == '1' || s[0] == '9';
if (s[2] == 'K' || s[2] == ':' || s[2] == '|') return (s[0] == '1' || s[0] == '9') && s[1] != 'z';
return false;
}

bool 纯绿牌(const string &s) {
const char* green_types[] = {"2sK", "3sK", "4sK", "2sS", "6sK", "8sK", "6zK",
"2s:", "3s:", "4s:", "6s:", "8s:", "6z:" };
"2s:", "3s:", "4s:", "6s:", "8s:", "6z:", "2s|", "3s|", "4s|", "6s|", "8s|", "6z|", };

return all_of(begin(green_types), end(green_types),
return any_of(begin(green_types), end(green_types),
[&s](const char* green) {return tile_group_match(s, green); });
}

Expand Down