summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/set.cpp5
-rw-r--r--common/set.h21
-rw-r--r--common/tile.h2
3 files changed, 28 insertions, 0 deletions
diff --git a/common/set.cpp b/common/set.cpp
new file mode 100644
index 0000000..ce44f02
--- /dev/null
+++ b/common/set.cpp
@@ -0,0 +1,5 @@
+#include "set.h"
+
+void Set::add_tile(Tile tile) {
+ container.push_back(tile);
+}
diff --git a/common/set.h b/common/set.h
new file mode 100644
index 0000000..3f762eb
--- /dev/null
+++ b/common/set.h
@@ -0,0 +1,21 @@
+#ifndef CHI_H
+#define CHI_H
+
+#include "tile.h"
+
+//! Contains a set of tiles
+class Set : public Tile {
+ private:
+ Tiles container;
+
+ public:
+ Set(){};
+ virtual ~Chi(){};
+
+ //! Add a tile to the set
+ //! \param tile The tile that should be added to the set
+ void add_tile(Tile tile);
+};
+
+
+#endif // CHI_H
diff --git a/common/tile.h b/common/tile.h
index 14fe8c1..6f83632 100644
--- a/common/tile.h
+++ b/common/tile.h
@@ -57,6 +57,8 @@ class Tile {
Tile();
Tile(Type t, bool re = false, bool ro = false);
+ virtual ~Tile(){};
+
template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
ar & type;