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