diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-11-25 01:50:08 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-11-25 02:04:12 +0100 |
commit | a56f67de16faaeb730375814faa22d406eaca19b (patch) | |
tree | ce3868f31c819d2743993441c59a6aa5eaf26e81 /common/tile.h | |
parent | 91fd9441dad8b4b7eb680268e2fc8e03a0b37078 (diff) |
Added get_num(), operator==() and operator++() to Tile.
Diffstat (limited to 'common/tile.h')
-rw-r--r-- | common/tile.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/tile.h b/common/tile.h index 6f83632..93bdb8d 100644 --- a/common/tile.h +++ b/common/tile.h @@ -59,6 +59,15 @@ class Tile { virtual ~Tile(){}; + //! Get the numeric value of the tile (if one of the man/pin/sou-sets). + int get_num(); + + //! Compare two tiles. Equal if type matches; flags are not compared. + bool operator==(const Tile& other); + + //! Increment type. Useful for iterating over all possible types. + Tile operator++(int); + template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & type; |