Cleaned up Network code (hope that fixes the PSP compilation problems)

Added random seed logging
This commit is contained in:
Xawotihs@gmail.com
2013-01-25 21:47:16 +00:00
parent 4bf419fbaf
commit 2ba5eb0022
10 changed files with 39 additions and 56 deletions

View File

@@ -73,11 +73,12 @@ protected:
list<int> usedRandomValues;
bool log;
public:
RandomGenerator(bool doLog = false) : log(doLog) {};
RandomGenerator(unsigned int seed = -1, bool doLog = false) : log(doLog) { if(seed != -1) srand(seed);};
void loadRandValues(string s);
ostream& saveUsedRandValues(ostream& out) const;
ostream& saveLoadedRandValues(ostream& out);
int random();
void setSeed(unsigned int seed) { srand(seed); };
template<typename Iter> void random_shuffle(Iter first, Iter last)
{
ptrdiff_t i, n;