/nix/store/i1aar97n7b4yf8rk94p66if25brfvvdx-gqvzl8a5pvrg3xj44q0msrndcripi8dk-source/src/controllers/gentlemanbot.h
Line | Count | Source |
1 | | #pragma once |
2 | | #include <memory> |
3 | | #include <string> |
4 | | #include <vector> |
5 | | |
6 | | #include "controllers/playercontroller.h" |
7 | | #include "types/event.h" |
8 | | #include "types/piecetype.h" |
9 | | #include "types/winds.h" |
10 | | |
11 | | namespace mahjong { |
12 | | |
13 | | // Always attempts to call Riichi. |
14 | | class GentlemanBot : public PlayerController { |
15 | | public: |
16 | 0 | static std::unique_ptr<PlayerController> New() { |
17 | 0 | return std::make_unique<GentlemanBot>(); |
18 | 0 | } |
19 | | |
20 | 0 | void GameStart(int _playerID) override {} |
21 | | void RoundStart(std::vector<Piece> hand, Wind seatWind, |
22 | | Wind prevalentWind) override; |
23 | | void ReceiveEvent(Event e) override; |
24 | | Event RetrieveDecision() override; |
25 | | |
26 | 0 | std::string Name() override { return "TotoBot"; }; |
27 | | |
28 | | private: |
29 | | Piece getDiscard(); |
30 | | |
31 | | std::vector<Piece> hand_; |
32 | | bool riichi_ = false; |
33 | | Event lastEvent_; |
34 | | }; |
35 | | |
36 | | } // namespace mahjong |