Libsaki
Core library of Pancake Mahjong
rinkai_huiyu.h
1 #ifndef SAKI_GIRL_RINKAI_HUIYU_H
2 #define SAKI_GIRL_RINKAI_HUIYU_H
3 
4 #include "../table/girl.h"
5 #include "../form/form_ctx.h"
6 
7 
8 
9 namespace saki
10 {
11 
12 
13 
14 class Huiyu : public GirlCrtp<Huiyu>
15 {
16 public:
18 
19  static void skill(Mount &mount, const Hand &hand, const FormCtx &ctx);
20 
21  void onDraw(const Table &table, Mount &mount, Who who, bool rinshan) override;
22 
23  ChoiceFilter filterChoice(const Table &table, Who who) override;
24 
25 private:
26  struct SssbgSet
27  {
28  int jump;
29  int ofs;
30  int v;
31  explicit SssbgSet(bool jump, int ofs, int v) : jump(jump), ofs(ofs), v(v) {}
32  };
33 
34  static bool expand(Mount &mount, const TileCount &total);
35  static int yssbg(std::bitset<34> &reqs, const TileCount &total);
36  static int colors(std::bitset<34> &reqs, const TileCount &total);
37  static int sssjg(std::bitset<34> &reqs, const TileCount &total);
38  static int tbd(std::bitset<34> &reqs, const TileCount &total);
39  static int qdqzqx(std::bitset<34> &reqs, const TileCount &total);
40  static int gtlt5(std::bitset<34> &reqs, const TileCount &total);
41  static std::array<T34, 9> makeSssbgTars(const SssbgSet &config);
42 };
43 
44 
45 
46 } // namespace saki
47 
48 
49 
50 #endif // SAKI_GIRL_RINKAI_HUIYU_H
Definition: form_ctx.h:11
Definition: mount.h:54
Definition: table.h:87
Definition: tile_count.h:17
Definition: choices.h:100
Definition: rinkai_huiyu.h:14
Definition: ai.cpp:18
Definition: hand.h:17
Definition: girl.h:212
void onDraw(const Table &table, Mount &mount, Who who, bool rinshan) override
Called when someone is about to draw a tile from the mountain.
Definition: rinkai_huiyu.cpp:44
Definition: who.h:14