Skip to content

Commit

Permalink
fix #32
Browse files Browse the repository at this point in the history
  • Loading branch information
zyr17 committed May 14, 2022
1 parent f149bf7 commit 46f7c3d
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 46f7c3d

Please sign in to comment.