/nix/store/i1aar97n7b4yf8rk94p66if25brfvvdx-gqvzl8a5pvrg3xj44q0msrndcripi8dk-source/src/scoring/yakus/bottomofthesea.cc
Line | Count | Source |
1 | | #include "scoring/yakus/bottomofthesea.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 isBottomOfTheSea(const GameState& state, int /*player*/, |
12 | 6 | const std::vector<const mahjong::Node*>& /*branch*/) { |
13 | 6 | return state.walls.GetRemainingPieces() == 0; |
14 | 6 | } |
15 | | |
16 | | REGISTER_YAKU({ |
17 | | .id = "bottomofthesea", |
18 | | .name = "Bottom of the Sea", |
19 | | .type = Yaku::kOpen, |
20 | | .value = 1, |
21 | | .is_yaku_func = yaku::isBottomOfTheSea, |
22 | | }); |
23 | | } // namespace mahjong::yaku |