C++ Project 2016-2017: Arkanoid
random.h
Go to the documentation of this file.
1 
3 #ifndef RANDOM_H
4 #define RANDOM_H
5 
6 #include <iostream>
7 
8 using namespace std;
9 
10 
11 namespace arkanoid {
12 
14  class Random {
15  private:
16  static Random* singleton;
17 
21  Random();
22 
23  // Not implemented (--> cant copy)
24  Random(Random const &other);
25  Random& operator=(Random const &other);
26 
27  public:
28 
34  static Random* getInstance();
35 
44  double randomDouble(int from, int to);
45  };
46 
47 }
48 
49 #endif /* RANDOM_H */
Singleton: generates "random" numbers.
Definition: random.h:14
All the game logic of the Arkanoid game.
Definition: ball.cpp:15