mirror of
https://github.com/correl/riichi.git
synced 2024-11-14 19:19:31 +00:00
21 lines
509 B
Erlang
21 lines
509 B
Erlang
-type wind() :: east | south | west | north.
|
|
-type dragon() :: green | red | white.
|
|
|
|
-record(tile, {
|
|
suit :: pin | man | sou | wind | dragon,
|
|
value :: integer() | wind() | dragon(),
|
|
from=draw :: draw | wind()
|
|
}).
|
|
-type tile() :: #tile{}.
|
|
|
|
-record(meld, {
|
|
type :: pair | chii | pon | kan,
|
|
tiles :: [tile()]
|
|
}).
|
|
-type meld() :: #meld{}.
|
|
|
|
-record(hand, {
|
|
tiles=[] :: [tile()],
|
|
melds=[] :: [meld()]
|
|
}).
|
|
-type hand() :: #hand{}.
|