diff options
author | Atle Hellvik Havsø <atle@havso.net> | 2010-11-20 11:38:54 +0100 |
---|---|---|
committer | Atle Hellvik Havsø <atle@havso.net> | 2010-11-20 11:38:54 +0100 |
commit | 895afc162184f80b9c12e4a7042bd9e6680af30f (patch) | |
tree | 286093ad9fccfaeefa4d7bc2b472aa3b9453aaf2 /server/wall.h | |
parent | b05d9ebf933665343892fb985ab3466181f92ab3 (diff) |
Created a Wall-class.
Signed-off-by: Atle Hellvik Havsø <atle@havso.net>
Diffstat (limited to 'server/wall.h')
-rw-r--r-- | server/wall.h | 32 |
1 files changed, 32 insertions, 0 deletions
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 <boost/random/mersenne_twister.hpp> +#include <vector> + + +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<Tile> 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 |