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

Public Types

using Heads = util::Stactor< C34, 14 >
 

Public Member Functions

 Parsed4 (const Heads &heads, int barkCt)
 Construct from raw comeld data. More...
 
const Headsheads () const
 
int barkCt () const
 
int step4 () const
 Compute 4-meld shanten number with given bark count. More...
 
std::bitset< 34 > effA4Set () const
 Get the set of first-class effective tiles of this parse formation.
 
util::Stactor< T34, 9 > claim3sk () const
 
bool operator== (const Parsed4 &that) const
 ordered equal, not set equal
 

Static Public Member Functions

static int workOfHeads (const Heads &heads)
 Shanten number by which this parsing result decreases to the hand. More...
 

Constructor & Destructor Documentation

◆ Parsed4()

saki::Parsed4::Parsed4 ( const Heads heads,
int  barkCt 
)
explicit

Construct from raw comeld data.

Parameters
headsHeads in any order, must not have comeld overflow
barkCtNumber of barks

By "comeld overflow", we mean the shanten number cannot be calculated by simply counting comelds.

An example of comeld overflow: 112233m 12p 78p 45s 99s (has 2 medls, 3 waiters, 1 birdhead — too many waiters, must discard one)

Member Function Documentation

◆ step4()

int saki::Parsed4::step4 ( ) const

Compute 4-meld shanten number with given bark count.

Parameters
barkCtNumber of barks

◆ workOfHeads()

int saki::Parsed4::workOfHeads ( const Heads heads)
static

Shanten number by which this parsing result decreases to the hand.

Parameters
headsHeads in any order

The function does not care about the 4-meld limit


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