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