diff options
Diffstat (limited to 'src/random.cpp')
| -rw-r--r-- | src/random.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/random.cpp b/src/random.cpp new file mode 100644 index 0000000..ec49e36 --- /dev/null +++ b/src/random.cpp @@ -0,0 +1,9 @@ +#include "random.hpp" +#include <cstdlib> +namespace Random +{ + int get_value(int min, int max) + { + return (std::rand()%(abs(max - min) + 1) + min); + } +} |
