diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-11-25 02:24:00 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-11-25 02:33:15 +0100 |
commit | d5aae396856ee801eb2e2420b786fda2f13cf391 (patch) | |
tree | 4799975814dfce34cea815716df9ed3dd2b7d0ac /server/wall.h | |
parent | a56f67de16faaeb730375814faa22d406eaca19b (diff) |
Changed parts of the Wall API to make it reusable. Simplified the building.
Diffstat (limited to 'server/wall.h')
-rw-r--r-- | server/wall.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/server/wall.h b/server/wall.h index ca48a40..aeef031 100644 --- a/server/wall.h +++ b/server/wall.h @@ -6,26 +6,24 @@ #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. + //! Our random number generator. Initialized with a seed of the current 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; + //! Contains the remaining tiles in the wall. + std::vector<Tile> wall; public: Wall(); - //! Returns true if there's only 14 tiles left in the wall (Round ends) - bool is_done(); + //! Build a new wall. + void build(); + + //! Number of remaining tiles in wall. + int remaining(); - //! Returns a random tile from the wall + //! Returns a random tile from the wall. Tile take_one(); }; |