diff options
Diffstat (limited to 'common/tile.h')
-rw-r--r-- | common/tile.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/tile.h b/common/tile.h index 84552aa..90e25dc 100644 --- a/common/tile.h +++ b/common/tile.h @@ -51,18 +51,34 @@ class Tile { Hatsu }; + enum Set { + Honor, + Man, + Pin, + Sou + }; + Type type; bool red; bool rotated; + //! Default constructor. Tile(); + + //! Construct tile by type. Tile(Type t, bool re = false, bool ro = false); + //! Construct tile by set and number. + Tile(Set s, int num, bool re = false, bool ro = false); + virtual ~Tile(){}; //! Get the numeric value of the tile (if one of the man/pin/sou-sets). int get_num() const; + //! Get the set type of the tile (if one of the man/pin/sou-sets). + Set get_set() const; + //! Compare two tiles. Equal if type matches; flags are not compared. bool operator==(const Tile& other) const; |