8 #include "table_view.h" 9 #include "table_observer.h" 11 #include "../form/tile_count.h" 12 #include "../util/rand.h" 29 bool any()
const {
return sutehai || doujun || riichi; }
30 bool none()
const {
return !any(); }
54 std::array<int, 4> mPoints;
55 std::array<int, 4> mRiichiHans;
56 std::array<int, 4> mLayPositions;
57 std::array<Furiten, 4> mFuritens;
58 std::array<Hand, 4> mHands;
59 std::array<River, 4> mRivers;
60 std::array<std::bitset<24>, 4> mPickeds;
61 std::array<Choices, 4> mChoicess;
62 std::array<Action, 4> mActionInbox;
63 std::array<int, 4> mNonces;
73 bool mAllLast =
false;
74 bool mToChangeDealer =
false;
75 bool mPrevIsRyuu =
false;
76 bool mToEstablishRiichi;
79 std::bitset<4> mIppatsuFlags;
80 std::array<std::bitset<34>, 4> mGenbutsuFlags;
90 enum class CheckResult { OK, EXPIRED, ILLEGAL };
94 std::array<int, 4> points;
95 std::array<std::unique_ptr<Girl>, 4> girls;
101 explicit Table(
const Table &orig, std::vector<TableObserver *> obs);
104 Table &operator=(
const Table &assign) =
delete;
107 void action(
Who who,
const Action &act,
int nonce);
108 CheckResult check(
Who who,
const Action &action,
int nonce)
const;
110 const Hand &getHand(
Who who)
const;
111 const River &getRiver(
Who who)
const;
112 const Girl &getGirl(
Who who)
const;
113 std::unique_ptr<TableView> getView(
Who who)
const;
115 const std::array<int, 4> &getPoints()
const;
116 int getRound()
const;
117 int getExtraRound()
const;
119 int riverRemain(
T34 t)
const;
120 int getRank(
Who who)
const;
122 const T37 &getFocusTile()
const;
123 bool genbutsu(
Who whose,
T34 t)
const;
124 bool lastDiscardLay()
const;
125 bool riichiEstablished(
Who who)
const;
126 bool duringKan()
const;
127 bool isAllLast()
const;
128 bool beforeEast1()
const;
129 bool inIppatsuCycle()
const;
130 bool anyActivated()
const;
132 Who findGirl(Girl::Id
id)
const;
133 Who getDealer()
const;
135 int getDeposit()
const;
136 int getSelfWind(
Who who)
const;
137 int getRoundWind()
const;
138 int getNonce(
Who who)
const;
139 const Rule &getRule()
const;
142 const Mount &getMount()
const;
145 void popUp(
Who who)
const;
148 bool checkLegality(
Who who,
const Action &action)
const;
150 void singleAction(
Who who,
const Action &act);
152 void setupObservers(
const std::vector<TableObserver *> obs);
157 void flipKandoraIndic();
158 void notifyFlipped();
159 void tryDraw(
Who who);
160 void swapOut(
Who who,
const T37 &out);
161 void spinOut(
Who who);
162 void barkOut(
Who who,
const T37 &out);
163 void discardEffects(
Who who,
bool spin);
164 void declareRiichi(
Who who,
const Action &action);
166 void chii(
Who who, ActCode dir,
const T37 &out,
bool showAka5);
167 void pon(
Who who,
const T37 &out,
int showAka5);
168 void daiminkan(
Who who);
170 void ankan(
Who who,
T34 tile);
171 void kakan(
Who who,
int barkId);
172 void finishKan(
Who who);
174 void everyonePassed();
175 bool filterChoices();
176 bool kanOverflow(
Who kanner);
177 bool noBarkYet()
const;
178 bool checkDeathWinds()
const;
179 void checkChankan(
bool only13 =
false);
181 void checkSutehaiFuriten();
182 void passRon(
Who who);
183 bool checkNagashimangan(
Who who)
const;
186 void checkNextRound();
190 std::array<std::unique_ptr<Girl>, 4> mGirls;
191 std::vector<TableObserver *> mObservers;
200 #endif // SAKI_TABLE_H Default-copy-constructable part of Table.
Definition: table.h:38
Definition: table_focus.h:13
Definition: tile_count.h:17
Choice set of one player.
Definition: choices.h:122
Definition: table_env.h:11
Stactor = statically allocated vector.
Definition: stactor.h:247
Base class for skill implementation.
Definition: girl.h:35