riichi/include/riichi.hrl

22 lines
509 B
Erlang
Raw Normal View History

2012-07-21 04:09:27 +00:00
-type wind() :: east | south | west | north.
-type dragon() :: green | red | white.
2012-07-21 04:09:27 +00:00
-record(tile, {
suit :: pin | man | sou | wind | dragon,
value :: integer() | wind() | dragon(),
from=draw :: draw | wind()
}).
2012-07-21 04:09:27 +00:00
-type tile() :: #tile{}.
2012-07-21 04:09:27 +00:00
-record(meld, {
type :: pair | chii | pon | kan,
tiles :: [tile()]
}).
2012-07-21 04:09:27 +00:00
-type meld() :: #meld{}.
2012-07-03 02:05:05 +00:00
2012-07-21 04:09:27 +00:00
-record(hand, {
tiles=[] :: [tile()],
melds=[] :: [meld()]
2012-07-03 02:05:05 +00:00
}).
2012-07-21 04:09:27 +00:00
-type hand() :: #hand{}.