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/afterakan.cc
Line
Count
Source
1
#include "scoring/yakus/afterakan.h"
2
3
#include <vector>
4
5
#include "analysis/handnode.h"
6
#include "scoring/yakus.h"
7
#include "types/gamestate.h"
8
#include "types/statefunction.h"
9
#include "types/yaku.h"
10
11
namespace mahjong::yaku {
12
bool isAfterAKan(const GameState& state, int player,
13
9
                 const std::vector<const mahjong::Node*>& /*branch*/) {
14
9
  if (state.currentPlayer != player) {
15
4
    return false;
16
4
  }
17
5
  if (state.prevState == StateFunctionType::kReplacement) {
18
1
    return true;
19
1
  }
20
4
  return false;
21
5
}
22
23
REGISTER_YAKU({
24
    .id = "afterakan",
25
    .name = "After a Kan",
26
    .type = Yaku::kOpen,
27
    .value = 1,
28
    .is_yaku_func = yaku::isAfterAKan,
29
});
30
}  // namespace mahjong::yaku