TODO: modify other races constructors
did some reworking
This commit is contained in:
11
src/rng.h
11
src/rng.h
@ -28,13 +28,14 @@ public:
|
||||
|
||||
bool trial(const fraction &psuccess);
|
||||
|
||||
bool coin_flip() const;
|
||||
bool coin_flip();
|
||||
|
||||
template<class T> T &get_rand_in_vector(std::vector<T> &vec) {
|
||||
curr_rand_num = rand();
|
||||
int exclude_middle(const int lower_bound, const int upper_bound,
|
||||
const int excluded);
|
||||
|
||||
return vec[curr_rand_num % vec.size()];
|
||||
}
|
||||
template<class T> T rand_exclude(std::vector<T> &vec, T &target);
|
||||
|
||||
template<class T> T get_rand_in_vector(std::vector<T> &vec);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user