|
Libsaki
Core library of Pancake Mahjong
|
Base class for skill implementation. More...
#include <girl.h>


Classes | |
| class | IrsCtrlGetter |
| Wrapper of a "T Girl::*" value where T implements IrsCtrl. More... | |
Public Member Functions | |
| Girl (Who who, Id id) | |
| Girl (const Girl ©)=default | |
| Girl & | operator= (const Girl &assign)=delete |
| virtual std::unique_ptr< Girl > | clone () const |
| Id | getId () const |
| virtual void | onDice (util::Rand &rand, const Table &table) |
| Called when someone is about to dice. | |
| virtual void | onMonkey (std::array< Exist, 4 > &exists, const Table &table) |
| virtual bool | checkInit (Who who, const Hand &init, const Table &table, int iter) |
| virtual void | onInbox (Who who, const Action &action) |
| virtual void | onDraw (const Table &table, Mount &mount, Who who, bool rinshan) |
| Called when someone is about to draw a tile from the mountain. | |
| virtual void | onChooseFirstDealer (util::Rand &rand, Who tempDealer, int &die1, int &die2) |
| virtual void | onIrsChecked (const Table &table, Mount &mount) |
| Called after self's IRS-check action. | |
| virtual void | onFlipKandoraIndic (const Table &table, Mount &mount) |
| Called before flipping kandora indicator. | |
| virtual void | onDigUradoraIndic (const Table &table, Mount &mount, util::Stactor< Who, 4 > openers) |
| Called after someone's win, before digging uradora indicator. More... | |
| void | onFilterChoice (const Table &table, Who who, ChoiceFilter &filter) |
| Called on the choice-filtering stage. | |
| void | onActivateDice (const Table &table) |
| Called when the dealer (self or not) is about to dice. | |
| void | onActivate (const Table &table) |
| Called when self is about to be activated. | |
| bool | irsReady () const |
| Whether the girl is ready to process an IRS action input. More... | |
| const Choices & | irsChoices () const |
| IRS choice set if IRS-ready, undefined otherwise. More... | |
| virtual std::optional< HrhInitFix > | onHrhRaid (const Table &table) |
| virtual HrhBargainer * | onHrhBargain (const Table &table) |
| virtual std::optional< HrhInitFix > | onHrhBeg (util::Rand &rand, const Table &table, const TileCount &stock) |
| virtual std::string | popUpStr () const |
| bool | handleIrs (const Table &table, Mount &mount, const Action &action) |
| Process an IRS action input. More... | |
Public Member Functions inherited from saki::TableObserver | |
| virtual void | onTableEvent (const Table &table, const TableEvent &event) |
Static Public Member Functions | |
| static std::unique_ptr< Girl > | create (Who who, Id id) |
Protected Member Functions | |
| void | accelerate (Mount &mount, const Hand &hand, const River &river, int delta) |
| virtual ChoiceFilter | filterChoice (const Table &table, Who who) |
| virtual IrsCtrlGetter | attachIrsOnDice () |
| Overriden to define a dice-time IRS's showing condition. More... | |
| virtual IrsCtrlGetter | attachIrsOnDrawn (const Table &table) |
| Overriden to define a drawn-time IRS's showing condition. More... | |
Static Protected Member Functions | |
| static void | eraseRivered (util::Stactor< T34, 34 > &ts, const River &river) |
| static void | eraseRivered (std::bitset< 34 > &ts, const River &river) |
Protected Attributes | |
| const Who | mSelf |
| const Id | mId |
Base class for skill implementation.
Girl's TableObserver callbacks will be called before ordinary observers. It is not needed to add girls to the observer vector when constructing a Table.
|
protectedvirtual |
Overriden to define a dice-time IRS's showing condition.
Reimplemented in saki::Sawaya, saki::Awai, and saki::Kasumi.
|
protectedvirtual |
Overriden to define a drawn-time IRS's showing condition.
Reimplemented in saki::Sawaya, saki::Sumire, and saki::Toki.
Process an IRS action input.
| const Choices & saki::Girl::irsChoices | ( | ) | const |
IRS choice set if IRS-ready, undefined otherwise.
| bool saki::Girl::irsReady | ( | ) | const |
Whether the girl is ready to process an IRS action input.
|
virtual |
Called after someone's win, before digging uradora indicator.
| openers | Players who opened their hand |
Reimplemented in saki::Awai.
1.8.13