Libsaki
Core library of Pancake Mahjong
Public Member Functions | Static Public Attributes | List of all members
saki::Who Class Reference

Public Member Functions

constexpr Who (int who)
 
 Who (unsigned who)
 
 Who (const Who &copy)=default
 
int index () const
 
unsigned uIndex () const
 
Who right () const
 
Who left () const
 
Who cross () const
 
Who byDice (int dice) const
 
Who byTurn (int turn) const
 
int looksAt (Who tar) const
 Relative position of anohter player. More...
 
int turnFrom (Who from) const
 Turning count from another players. More...
 
bool somebody () const
 
bool nobody () const
 
bool human () const
 
bool operator== (Who rhs) const
 
bool operator!= (Who rhs) const
 
Whooperator= (const Who &assign)=default
 

Static Public Attributes

static constexpr int HUMAN_INDEX = 0
 

Member Function Documentation

◆ looksAt()

int saki::Who::looksAt ( Who  tar) const
inline

Relative position of anohter player.

Parameters
tarThe other player
Returns
0 if tar is on this's left, 1 if cross, 2 if right.

◆ turnFrom()

int saki::Who::turnFrom ( Who  from) const
inline

Turning count from another players.

Parameters
fromThe other player
Returns
0 if self, 1 if this is from's right, 2 if cross, 3 if left

The documentation for this class was generated from the following file: