michael@0: // Common/Random.cpp michael@0: michael@0: #include "StdAfx.h" michael@0: michael@0: #include michael@0: #include michael@0: michael@0: #include "Common/Random.h" michael@0: michael@0: void CRandom::Init(unsigned int seed) michael@0: { srand(seed); } michael@0: michael@0: void CRandom::Init() michael@0: { Init((unsigned int)time(NULL)); } michael@0: michael@0: int CRandom::Generate() const michael@0: { return rand(); }