-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathround_result.hpp
59 lines (42 loc) · 1.38 KB
/
round_result.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#if !defined(KANACHAN_SIMULATION_ROUND_RESULT_HPP_INCLUDE_GUARD)
#define KANACHAN_SIMULATION_ROUND_RESULT_HPP_INCLUDE_GUARD
#include <cstdint>
namespace Kanachan{
class RoundResult
{
public:
RoundResult();
// `type == 0`: 親の自摸和
// `type == 1`: 子の自摸和
// `type == 2`: 子⇒親の被自摸和
// `type == 3`: 親=>子の被自摸和
// `type == 4`: 子=>子の被自摸和
// `type == 5`: 親の栄和
// `type == 6`: 子の栄和
// `type == 7`: 子⇒親の放銃
// `type == 8`: 親=>子の放銃
// `type == 9`: 子=>子の放銃
// `type == 10`: 横移動
// `type == 11`: 荒牌平局(不聴)
// `type == 12`: 荒牌平局(聴牌)
// `type == 13`: 荒牌平局(流し満貫)
// `type == 14`: 途中流局
void setType(std::uint_fast8_t type);
void setInLizhi(bool in_lizhi);
void setHasFulu(bool has_fulu);
void setRoundDeltaScore(std::int_fast32_t round_delta_score);
void setRoundScore(std::int_fast32_t round_score);
std::uint_fast8_t getType() const noexcept;
bool getInLizhi() const noexcept;
bool getHasFulu() const noexcept;
std::int_fast32_t getRoundDeltaScore() const noexcept;
std::int_fast32_t getRoundScore() const noexcept;
private:
std::uint_fast8_t type_;
bool in_lizhi_;
bool has_fulu_;
std::int_fast32_t round_delta_score_;
std::int_fast32_t round_score_;
};
}
#endif