RandomSystem.cpp
Go to the documentation of this file.
1 #include "RandomSystem.hpp"
2 
3 namespace iv
4 {
5 
7  System( sc )
8 {
9 }
10 
11 void RandomSystem::seed( RandomId id, uint_fast32_t seed )
12 {
13  this->seeds[ id ] = seed;
14 }
15 
16 uint_fast32_t RandomSystem::seed( RandomId id )
17 {
18  auto it = this->seeds.find( id );
19  if( it == this->seeds.end() )
20  return 0;
21  return it->second;
22 }
23 
24 }