All functions

calc_defen()

Calculate score of hand

calc_xiangting()

Calculate xiangting number of hands

collect_tingpai()

Collect tingpais for hands

default_rule()

Create default rule set

tile2rank() tile2suit() is_fulou() is_tsumogiri() is_lizhi() is_suit() is_yaojiu() is_zhongzhang() is_suzhi()

Detect specific tiles

hand2img()

Plot a player's hand as an image

hupai

List of hupai

int2tile()

Convert integers to tiles

is_valid_tile()

Check if each element is a valid tile

lineup()

Line up tiles

lipai()

Compose hands from character vectors

mjai_target() mjai_conv()

Convert symbols from 'mjai' format

modify_rule()

Modify the default rule set by patch

paistr() is_paistr() calculate(<skksph_paistr>) plot(<skksph_paistr>) tidy(<skksph_paistr>)

paistr vector

parse_hupai()

Parse chains of hupai ids

proceed()

Proceed state of hands

rand_hands()

Create a function to randomly generate hands

rand_qipai()

Generate hands at random

ranked_game

Sample data of mahjong game log

testdat_xiangting

Test cases for calc_xiangting()

tiles

Lookup table for tiles conversion

trans_tile()

Translate tiles from one format to another