summaryrefslogtreecommitdiff
path: root/server/wall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'server/wall.cpp')
-rw-r--r--server/wall.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/server/wall.cpp b/server/wall.cpp
deleted file mode 100644
index 42df094..0000000
--- a/server/wall.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "wall.h"
-
-#include <boost/random/uniform_int.hpp>
-#include <boost/random/variate_generator.hpp>
-#include <ctime>
-
-#include <iostream>
-
-Wall::Wall() : rand_gen(std::time(0)) {
-
-}
-
-void Wall::build() {
- // Clear any previous wall.
- wall.clear();
-
- for(Tile tile = Tile::Man_1; tile.type <= Tile::Hatsu; tile++) {
- wall.push_back(Tile(tile.type, tile.get_num() == 5)); // Insert a copy of the current tile, and make it red if it is 5.
- wall.push_back(tile);
- wall.push_back(tile);
- wall.push_back(tile);
- }
-}
-
-int Wall::remaining() {
- return wall.size();
-}
-
-Tile Wall::take_one() {
- //return wall.front();
-
- boost::uniform_int<> range(0, wall.size() - 1);
-
- boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(rand_gen, range);
-
- int num = die();
-
- Tile to_return = wall[num];
- wall.erase(wall.begin() + num);
-
- return to_return;
-}