Coverage Report

Created: 2026-11-14 03:38

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/nix/store/rr0r40cw3mzzbz0sxrnkvnrjpzb82wpc-j27cjzgh5nmq3y8k6hwa6zpi3qgcjia8-source/src/scoring/yakus/fourkans.cc
Line
Count
Source
1
#include "scoring/yakus/fourkans.h"
2
3
#include <vector>
4
5
#include "analysis/handnode.h"
6
#include "scoring/yakus.h"
7
#include "types/gamestate.h"
8
#include "types/hand.h"
9
#include "types/sets.h"
10
#include "types/yaku.h"
11
12
namespace mahjong::yaku {
13
bool isFourKans(const GameState& /*state*/, const Hand& hand,
14
0
                const std::vector<const mahjong::Node*>& /*branch*/) {
15
0
  int kans = 0;
16
0
  for (const auto& meld : hand.melds_range()) {
17
0
    if (meld.type >= SetType::kKan) {
18
0
      kans++;
19
0
    }
20
0
  }
21
0
  return kans == 4;
22
0
}
23
24
REGISTER_YAKU({
25
    .id = "fourkans",
26
    .name = "Four Kans",
27
    .type = Yaku::kYakuman,
28
    .value = 1,
29
    .is_yaku_func = yaku::isFourKans,
30
});
31
}  // namespace mahjong::yaku