Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_systems
RandomSystem
RandomSystem.cpp
Go to the documentation of this file.
1
#include "
RandomSystem.hpp
"
2
3
namespace
iv
4
{
5
6
RandomSystem::RandomSystem
(
SystemContainer
* sc ) :
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
}