2012-07-21 04:09:27 +00:00
|
|
|
-type wind() :: east | south | west | north.
|
|
|
|
-type dragon() :: green | red | white.
|
2012-05-08 04:46:15 +00:00
|
|
|
|
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-05-08 04:46:15 +00:00
|
|
|
}).
|
2012-07-21 04:09:27 +00:00
|
|
|
-type tile() :: #tile{}.
|
2012-05-08 04:46:15 +00:00
|
|
|
|
2012-07-21 04:09:27 +00:00
|
|
|
-record(meld, {
|
|
|
|
type :: pair | chii | pon | kan,
|
|
|
|
tiles :: [tile()]
|
2012-05-08 04:46:15 +00:00
|
|
|
}).
|
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{}.
|