Skip to content
Snippets Groups Projects
Select Git revision
  • 7519de80a42ab7095697f684a4fcaebd0a79cebc
  • master default protected
2 results

Dice.hpp

Blame
  • Dice.hpp 329 B
    #ifndef DICE_HPP
    #define DICE_HPP
    
    #include <random>
    
    class Dice
    {
      private:
    
        std::mt19937 mt_;
        std::uniform_int_distribution<unsigned int> distribution_;
    
        Dice();
        Dice(const Dice& copy) = delete;
        ~Dice() = default;
    
      public:
    
        static Dice& getInstance();
        unsigned int roll();
    };
    
    #endif // DICE_HPP