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/blessingofheaven.cc
Line
Count
Source
1
#include "scoring/yakus/blessingofheaven.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 isBlessingOfHeaven(const GameState& state, int player,
12
0
                        const std::vector<const mahjong::Node*>& /*branch*/) {
13
0
  if (state.hands.at(player).open) {
14
0
    return false;
15
0
  }
16
0
  if (player != 0) {
17
0
    return false;
18
0
  }
19
0
  if (state.hasRonned[0]) {
20
0
    return false;
21
0
  }
22
0
  if (state.turnNum != 0) {
23
0
    return false;
24
0
  }
25
0
  return true;
26
0
}
27
28
REGISTER_YAKU({
29
    .id = "blessingofheaven",
30
    .name = "Blessing of Heaven",
31
    .type = Yaku::kYakuman,
32
    .value = 13,
33
    .is_yaku_func = yaku::isBlessingOfHeaven,
34
});
35
}  // namespace mahjong::yaku