Random.h 375 B

123456789101112131415161718192021222324
  1. #ifndef RANDOM_H
  2. #define RANDOM_H
  3. class Random final {
  4. public:
  5. Random(int seed);
  6. Random();
  7. int next();
  8. int next(int min, int inclusiveMax);
  9. float nextFloat();
  10. float nextFloat(float min, float exclusiveMax);
  11. private:
  12. constexpr static int N = 25;
  13. constexpr static int M = 7;
  14. void update();
  15. int data[N];
  16. int index;
  17. };
  18. #endif