From 895afc162184f80b9c12e4a7042bd9e6680af30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atle=20Hellvik=20Havs=C3=B8?= Date: Sat, 20 Nov 2010 11:38:54 +0100 Subject: Created a Wall-class. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Atle Hellvik Havsø --- server/wall.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 server/wall.h (limited to 'server/wall.h') diff --git a/server/wall.h b/server/wall.h new file mode 100644 index 0000000..8f864d0 --- /dev/null +++ b/server/wall.h @@ -0,0 +1,32 @@ +#ifndef WALL_H +#define WALL_H + +#include "..\common\tile.h" + +#include +#include + + +class Wall { + private: + + //! Our random number generator. Initialized with a seed of the curren time that the object is constructed. + boost::mt19937 rand_gen; + + //! Contains all the tiles in the wall + std::vector m_wall; + + //! Contains the number of tiles left in the wall + int num_tiles; + + public: + Wall(); + + //! Returns true if there's only 14 tiles left in the wall (Round ends) + bool is_done(); + + //! Returns a random tile from the wall + Tile take_one(); +}; + +#endif // WALL_H -- cgit v1.2.3