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/riichi.cc
Line
Count
Source
1
#include "scoring/yakus/riichi.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/yaku.h"
10
11
namespace mahjong::yaku {
12
bool isRiichi(const GameState& state, const Hand& hand,
13
5
              const std::vector<const mahjong::Node*>& /*branch*/) {
14
5
  return hand.riichi && !hand.open && (state.turnNum > 4 || state.lastCall < 0);
15
5
}
16
17
REGISTER_YAKU({
18
    .id = "riichi",
19
    .name = "Riichi",
20
    .type = Yaku::kClosed,
21
    .value = 1,
22
    .is_yaku_func = yaku::isRiichi,
23
});
24
}  // namespace mahjong::yaku