Coverage Report

Created: 2025-09-03 03:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/nix/store/i1aar97n7b4yf8rk94p66if25brfvvdx-gqvzl8a5pvrg3xj44q0msrndcripi8dk-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/yaku.h"
9
10
namespace mahjong::yaku {
11
bool isRiichi(const GameState& state, int player,
12
5
              const std::vector<const mahjong::Node*>& /*branch*/) {
13
5
  return state.hands.at(player).riichi && !state.hands.at(player).open &&
14
5
         (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