Libsaki
Core library of Pancake Mahjong
gen.h
1 #ifndef SAKI_GEN_H
2 #define SAKI_GEN_H
3 
4 #include "../form/form.h"
5 #include "../util/rand.h"
6 
7 
8 
9 namespace saki
10 {
11 
12 
13 
14 class Gen
15 {
16 public:
17  static Gen genForm4FuHan(util::Rand &rand, int fu, int han, int selfWind, int roundWind,
18  const Rule &rule, bool ron);
19  static Gen genForm4Mangan(util::Rand &rand, int han, int selfWind, int roundWind,
20  const Rule &rule, bool ron);
21  static Gen genForm4(util::Rand &rand, int triCent, int quadCent, int openCent,
22  int selfWind, int roundWind, const Rule &rule, bool ron);
23  static Gen genForm4F110(util::Rand &rand, int point, int selfWind, const Rule &rule, bool ron);
24  static Gen genForm4F110Han(util::Rand &rand, int han, int selfWind, const Rule &rule, bool ron);
25  static Gen genForm4F110Horse(util::Rand &rand, int selfWind, const Rule &rule, bool ron);
26 
27 private:
28  Gen(const Form &form, const Hand &hand, const T37 &pick);
29 
30  static Hand genFormal4(util::Rand &rand, int triCent, int quadCent, int openCent);
31  static Hand genWild4(util::Rand &rand, int triCent, int quadCent, int openCent);
32  static void genInfo(util::Rand &rand, FormCtx &ctx, T34 pick, const Hand &h,
33  bool ron, bool f110);
34 
35 public:
36  Form form;
37  Hand hand;
38  T37 pick;
39 };
40 
41 
42 
43 } // namespace saki
44 
45 
46 
47 #endif // SAKI_GEN_H
Definition: form.h:39
Definition: rule.h:13
Definition: form_ctx.h:11
Definition: rand.h:19
Definition: tile.h:25
Definition: ai.cpp:18
Definition: hand.h:17
Definition: tile.h:353
Definition: gen.h:14